mypy
mypy copied to clipboard
Daemon support for --follow-imports=silent
After #5870 is done, it would be nice to also support the missing silent
option in following imports... :)
Do you want to work on this? What situation leads you to need this?
I just think this would be useful when starting to add mypy
to an existing large code base.
As described here:
- When running it with
follow_imports = skip
the not whitelisted but already annotated code is needlessly ignored - When running it with
follow_imports = normal
you might get thousands of errors, especially when for exampledisallow_untyped_defs = True
is set - Running with
follow_imports = silent
would allow making use of annotated dependent code without forcing you to actually fix those thousands of errors...
This would be really impactful for us! We're facing the same issue
Any updates on this?
At the very least, this should be a warning and not prevent the daemon from running.
Use case: large, incorrectly / un-typed codebase. Trying to look at errors in a single file and clear them out. So I put follow_imports = skip
in the config file so I can just run mypy file.py
in the terminal. Now the daemon won't run, and that's what I'm using in VSCode.
The alternative to this is to always add the flag when running in the command line, or create an alias / shell script / whatever, but I'd really like this to be easy for everyone working in the codebase.