8000 Namespace packages (PEP 420) by gvanrossum · Pull Request #5691 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Namespace packages (PEP 420) #5691

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

Merged
merged 14 commits into from
Oct 3, 2018
Prev Previous commit
Next Next commit
Add test showing the first hit is used
  • Loading branch information
Guido van Rossum committed Oct 1, 2018
commit 9d8f94d1659e04a00a9d645b669dba22720b22ae
12 changes: 12 additions & 0 deletions test-data/unit/check-modules.test
Original file line number Diff line number Diff line change
Expand Up @@ -2581,3 +2581,15 @@ y = 0
[file mypy.ini]
[[mypy]
mypy_path = tmp/xx, tmp/yy

[case testNamespacePackagePickFirstOnMypyPath]
# flags: --namespace-packages --config-file tmp/mypy.ini
from foo.bar import x
reveal_type(x) # E: Revealed type is 'builtins.int'
[file xx/foo/bar.py]
x = 0
[file yy/foo/bar.py]
x = ''
[file mypy.ini]
[[mypy]
mypy_path = tmp/xx, tmp/yy
0