Try simple-minded call expression cache by ilevkivskyi · Pull Request #19505 · python/mypy

added 5 commits

July 25, 2025 09:34

sterliakov

sterliakov

@ilevkivskyi

sterliakov

agentydragon pushed a commit to agentydragon/ducktape that referenced this pull request

Nov 15, 2025
Added the disable_expression_cache flag to [tool.mypy] section in
pyproject.toml to ensure mypy runs use the workaround everywhere, not just
in pre-commit hooks.

Added documentation linking to:
- PR #19505 that introduced the expression cache bug
- TODO to file upstream issue with reproduction case
- TODO to remove workaround once bug is fixed

The flag is needed in both places:
- .pre-commit-config.yaml: For pre-commit hook runs
- pyproject.toml: For direct mypy invocations and IDE integrations

References:
- python/mypy#19505 (expression cache PR)
- mypy 1.18.1+ affected by cross-module Final[str] type loss