You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mypy reliably fails to take into account a type: ignore comment on the second run after deleting the cache.
To Reproduce
rm -r .mypy_cache
mypy .
mypy .
Expected Behavior
The second run of mypy should behave exactly the same as the first run.
Actual Behavior
$ rm -r .mypy_cache
$ mypy .
Success: no issues found in 23 source files
$ mypy .
infra/app.py:9: error: Skipping analyzing 'aws_cdk': found module but no type hints or library stubs
infra/datalake/datalake_stack.py:4: error: Skipping analyzing 'aws_cdk': found module but no type hints or library stubs
infra/datalake/datalake_stack.py:4: note: See https://mypy.readthedocs.io/en/latest/running_mypy.html#missing-imports
Found 2 errors in 2 files (checked 23 source files)
Some subsequent runs will succeed, but I've not looked into the pattern. I was able to run while pre-commit run --all-files mypy; do rm -r .mypy_cache; done a bunch of rounds without failure.
Your Environment
Mypy version used: 0.790
Mypy command-line flags: None
Mypy configuration options from mypy.ini (and other config files): None
Uh oh!
There was an error while loading. Please reload this page.
Bug Report
mypy
reliably fails to take into account atype: ignore
comment on the second run after deleting the cache.To Reproduce
rm -r .mypy_cache
mypy .
mypy .
Expected Behavior
The second run of
mypy
should behave exactly the same as the first run.Actual Behavior
Some subsequent runs will succeed, but I've not looked into the pattern. I was able to run
while pre-commit run --all-files mypy; do rm -r .mypy_cache; done
a bunch of rounds without failure.Your Environment
mypy.ini
(and other config files): NoneRelevant commit
Workaround
Add
--no-incremental
to themypy
arguments.The text was updated successfully, but these errors were encountered: