-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Support recursive traversal into PEP 420 namespace packages #7219
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
Conversation
If and when python/mypy#7219 lands, we will have the ability to tell mypy to traverse into PEP 420 namespace packages. In order to preserve backward compatibility, the MypyExtension now allows clients to set the mypy command line arguments, but if they don't it will use the old command line of just passing the source directory.
After internal testing, this does seem to do what I'm looking for. One small semi-related gotcha: you can't seem to specify |
E.g. with this file layout: src/ anamespace/ foo/ __init__.py bar.py $ MYPYPATH=src mypy -p foo --namespace-packages will traverse into src/anamespace/foo
I restarted the failed travis job, seems to have been an error on their end. |
I wonder if appveyor is stuck? |
It looks like it actually succeeded but didn't report success GitHub. |
@JelleZijlstra Should I push another commit or is the status good enough to review (and hopefully merge :) this PR? |
I think it should be fine but I won't be merging the PR, sorry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me!
Thanks! I look forward to the next release. I'll likely hot fix our internal version in the meantime. |
E.g. with this file layout:
running
$ MYPYPATH=src mypy -p foo --namespace-packages
will traverse into
src/anamespace/foo
Closes #6989