We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebfc647 commit 0001936Copy full SHA for 0001936
mypy/subtypes.py
@@ -295,9 +295,9 @@ def is_enum_value_pair(a: Type, b: Type) -> bool:
295
return False
296
if b.fallback.type.is_enum:
297
a, b = b, a
298
- if b.fallback.type.is_enum:
+ if b.fallback.type.is_enum or not a.fallback.type.is_enum:
299
300
- # At this point we have a pair (non-enum literal, enum literal).
+ # At this point we have a pair (enum literal, non-enum literal).
301
# Check that the non-enum fallback is compatible
302
if not is_subtype(a.fallback, b.fallback):
303
0 commit comments