FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix source discovery beside namespace directories by nightcityblade · Pull Request #22178 · python/mypy · GitHub

Repository navigation

Fix source discovery beside namespace directories - #22178

Open
nightcityblade wants to merge 1 commit into
python:masterfrom
nightcityblade:fix/issue-22160
Open

nightcityblade wants to merge 1 commit into
python:masterfrom
nightcityblade:fix/issue-22160

Conversation

Copy link
Copy Markdown

Fixes #22160

Directory discovery previously treated any populated child directory as shadowing a sibling module with the same name. This limits shadowing to regular packages with an __init__.py or __init__.pyi, so files beside same-named namespace directories are checked.

Added regression coverage for both namespace-directory and regular-package collisions.

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

scipy-stubs (https://github.com/scipy/scipy-stubs)
+ tests/misc/test_submodules_empty.pyi:3: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File x.py is skiped if directory x exists

1 participant


Back | FazBrowse Home | New Git URL