Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3.1k
Stubtest: check_value_ for ellipsis-valued stub enum members#19760
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
Stubtest: check_value_ for ellipsis-valued stub enum members#19760
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| elifruntime_typeisnotNoneandis_subtype_helper(runtime_type,value_t.type): | ||
| should_error=False | ||
| elifruntime_typeisnotNone: | ||
| note=" (incompatible '_value_')" |
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.
Is this intentionally making theruntime_type is None case error now? (I tried thinking about it but IDK what that means. I also don't know stubtest very well :^)
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 also tried thinking about that, couldn't invent a case where we have found an attribute but failed to interpret itsvalue, and decided to be cautious, reporting such "smth weird" cases as incompatibilities. Maybe this should be anassert, but I'm afraid to accidentally kill stubtest right before release...
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.
Okay, almost all other checks do not reject "wtf" values as incompatible, updated for consistency.
Uh oh!
There was an error while loading.Please reload this page.
7aed696 intopython:masterUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Currently stubtest allows unsound definitions:
This PR teaches
stubtestthat_value_attribute (spec) should be used as a fallback in such case.