Return (platform, [values...]) for options that affect the cache. The list contains values for OPTIONS_AFFECTING_CACHE_NO_PLATFORM in sorted attribute name order. Keys are omitted since the cache is invalidated when the mypy version changes, and keys are constant on
(self)
| 647 | return re.compile(expr + "\\Z") |
| 648 | |
| 649 | def select_options_affecting_cache(self) -> tuple[str, list[object]]: |
| 650 | """Return (platform, [values...]) for options that affect the cache. |
| 651 | |
| 652 | The list contains values for OPTIONS_AFFECTING_CACHE_NO_PLATFORM |
| 653 | in sorted attribute name order. Keys are omitted since the cache |
| 654 | is invalidated when the mypy version changes, and keys are constant |
| 655 | on any specific mypy version. |
| 656 | """ |
| 657 | result: list[object] = [] |
| 658 | for opt in OPTIONS_AFFECTING_CACHE_NO_PLATFORM: |
| 659 | val = getattr(self, opt) |
| 660 | if opt in ("disabled_error_codes", "enabled_error_codes"): |
| 661 | val = sorted([code.code for code in val]) |
| 662 | result.append(val) |
| 663 | return self.platform, result |
| 664 | |
| 665 | def dep_import_options(self) -> bytes: |
| 666 | """Return opaque bytes with options that can affect dependent modules as well. |
no test coverage detected