Skip to content

Fix dmypy inspect for namespace packages#16357

Merged
JukkaL merged 2 commits intopython:masterfrom
ilevkivskyi:fix-inspect-namespace
Oct 30, 2023
Merged

Fix dmypy inspect for namespace packages#16357
JukkaL merged 2 commits intopython:masterfrom
ilevkivskyi:fix-inspect-namespace

Conversation

@ilevkivskyi
Copy link
Copy Markdown
Member

Fixes #15781

The fix is to switch to already resolved paths instead of relying on crawl_up(). This should be more robust w.r.t. various special cases. I also tweak the tests slightly to show full file names, to have a more consistent output.

@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

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

discord.py (https://github.com/Rapptz/discord.py): typechecking got 1.10x slower (128.0s -> 141.0s)
(Performance measurements are based on a single noisy sample)

@ilevkivskyi ilevkivskyi mentioned this pull request Oct 29, 2023
2 tasks
@JukkaL JukkaL merged commit 4e30e89 into python:master Oct 30, 2023
@ilevkivskyi ilevkivskyi deleted the fix-inspect-namespace branch October 30, 2023 19:19
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.

(🐞) dmypy inspect doesn't select the right file with multiple files with same name

2 participants