Uh oh!
There was an error while loading. Please reload this page.
stubtest: emit error if a stub defines a public type alias that doesn't exist at runtime - #12608
Conversation
hauntsaninja
left a comment
There was a problem hiding this comment.
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!
AlexWaygood
commented
Apr 18, 2022
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? |
Uh oh!
There was an error while loading. Please reload this page.
AlexWaygood
commented
Apr 18, 2022
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