-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
stubtest: emit error if a stub defines a public type alias that doesn't exist at runtime #12608
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
Conversation
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! I think it can be easier to preserve line numbers... I took the liberty of pushing changes directly to the branch, let me know what you think!
Nice, thank you!! That's... much simpler than my method 🤦♂️ Just one nit about error messages -- we currently have:
I'd much prefer either this, separating the English from the code using a colon:
or this, separating the English from the code using quotation marks:
What do you think? |
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.
I approve my own PR
Thanks @hauntsaninja :) |
Description
A followup to python/typeshed#7634 (comment)
Stubtest currently declines to error if a stub defines a public type alias that doesn't exist at runtime. But it should!
These are the new error reported from running stubtest on the typeshed stdlib, with this patch applied:
They all look like true positives to me (or at least should be allowlisted in typeshed, rather than being ignored by stubtest altogether).
Test Plan
Two test cases added