Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Print InspectError traceback in stubgenwalk_packages when verbose is specified#18224
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Print InspectError traceback in stubgenwalk_packages when verbose is specified#18224
Uh oh!
There was an error while loading.Please reload this page.
Conversation
This comment has been minimized.
This comment has been minimized.
hamdanal left a comment
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.
Thanks. Could you print the traceback tostderr instead? You might also changefind_module_paths_using_imports to print tostderr as well.
645f12f to938757eComparegareth-cross commentedDec 21, 2024
Done for both. |
brianschubert commentedDec 21, 2024
(For future reference: try to avoid force pushing. It makes it hard to review changes. We squash merge anyway, so extra commits in the PR history doesn’t matter) |
gareth-cross commentedDec 21, 2024
Apologies - good call. |
According tomypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅ |
hamdanal left a comment
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.
Thanks.
ceaf48d intopython:masterUh oh!
There was an error while loading.Please reload this page.
This change modifies
walk_packagessuch that the fullImporErrortraceback is printed when a module cannot be imported. The goal is to provide the user with more context to debug the error.I implemented this change by mirroring existing behavior in
find_module_paths_using_imports:mypy/mypy/stubgen.py
Lines 1522 to 1529 in9405bfd