Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document per-module follow_imports more explicitly #10845

Merged
merged 2 commits into from
Aug 1, 2021

Conversation

hauntsaninja
Copy link
Collaborator

@hauntsaninja hauntsaninja commented Jul 21, 2021

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

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.
@hauntsaninja hauntsaninja merged commit 7b0df28 into python:master Aug 1, 2021
@hauntsaninja hauntsaninja deleted the follow branch August 1, 2021 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant