Support recursive traversal into PEP 420 namespace packages#7219
Merged
msullivan merged 1 commit intopython:masterfrom Jul 18, 2019
Merged
Support recursive traversal into PEP 420 namespace packages#7219msullivan merged 1 commit intopython:masterfrom
msullivan merged 1 commit intopython:masterfrom
Conversation
warsaw
pushed a commit
to warsaw/pygradle
that referenced
this pull request
Jul 16, 2019
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.
Member
Author
|
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
Member
|
I restarted the failed travis job, seems to have been an error on their end. |
Member
Author
|
I wonder if appveyor is stuck? |
Member
|
It looks like it actually succeeded but didn't report success GitHub. |
Member
Author
|
@JelleZijlstra Should I push another commit or is the status good enough to review (and hopefully merge :) this PR? |
Member
|
I think it should be fine but I won't be merging the PR, sorry. |
msullivan
approved these changes
Jul 18, 2019
Collaborator
msullivan
left a comment
There was a problem hiding this comment.
This looks good to me!
Member
Author
|
Thanks! I look forward to the next release. I'll likely hot fix our internal version in the meantime. |
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.
E.g. with this file layout:
running
$ MYPYPATH=src mypy -p foo --namespace-packageswill traverse into
src/anamespace/fooCloses #6989