Skip to content

Commit 39cd8bc

Browse files
committed
new
1 parent 32f0502 commit 39cd8bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

mypy/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6757,7 +6757,7 @@ def narrow_type_by_identity_equality(
67576757
elif operator in {"==", "!="}:
67586758
is_target_for_value_narrowing = is_singleton_equality_type
67596759

6760-
should_coerce_literals = False
6760+
should_coerce_literals = True
67616761
for i in expr_indices:
67626762
typ = get_proper_type(operand_types[i])
67636763
if is_literal_type_like(typ) or (isinstance(typ, Instance) and typ.type.is_enum):

0 commit comments

Comments
 (0)