-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
gh-119180: Use equality when comparing against annotationlib.Format
#131755
Conversation
@@ -2315,7 +2315,7 @@ def get_type_hints(obj, globalns=None, localns=None, include_extras=False, | |||
hints = {} | |||
for base in reversed(obj.__mro__): | |||
ann = annotationlib.get_annotations(base, format=format) | |||
if format is annotationlib.Format.STRING: | |||
if format == annotationlib.Format.STRING: |
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.
Could you add at least one test case affected by this? Would require passing Format.STRING.value
to get_type_hints()
.
Your tests are failing |
|
As per #119180 (comment).
We can probably skip news on this one.