Document per-module follow_imports more explicitly - #10845
Merged
Conversation
Helps with python#10842, python#10820 and others There have been a number of issues recently where having this spelt out a little more explicitly would help users. The introduction of `--exclude` also (pretty understandably) confuses users who don't realise mypy's recursive file discovery is a little separate from its dogged import following. I think it could be reasonable to change mypy's behaviour so that exclude also implies follow_imports=skip (or maybe silent), but it might be a little finnicky (one is a regex on filenames, the other is patterns on fully qualified module names). I'm also just wary of attempting to change this - import following configuration is probably one of the more complicated and poorly understood parts of mypy's UX - so passing on that for now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Helps with #10842, #10820 and others
There have been a number of issues recently where having this spelt out
a little more explicitly would help users. The introduction of
--excludealso (pretty understandably) confuses users who don't realisemypy's recursive file discovery is a little separate from its dogged
import following.
I think it could be reasonable to change mypy's behaviour so that
exclude also implies follow_imports=skip (or maybe silent), but it might
be a little finnicky (one is a regex on filenames, the other is patterns
on fully qualified module names). I'm also just wary of attempting to
change this - import following configuration is probably one of the
more complicated and poorly understood parts of mypy's UX - so passing
on that for now.