mypy icon indicating copy to clipboard operation
mypy copied to clipboard

Daemon support for --follow-imports=silent

Open rggjan opened this issue 4 years ago • 4 comments

After #5870 is done, it would be nice to also support the missing silent option in following imports... :)

rggjan avatar Sep 24 '20 13:09 rggjan

Do you want to work on this? What situation leads you to need this?

gvanrossum avatar Sep 24 '20 14:09 gvanrossum

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 example disallow_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...

rggjan avatar Sep 25 '20 07:09 rggjan

This would be really impactful for us! We're facing the same issue

noncuro avatar Jun 07 '23 20:06 noncuro

Any updates on this?

FeryET avatar Jul 04 '23 11:07 FeryET

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.

shaperilio avatar May 03 '24 19:05 shaperilio