Skip to content

Commit 996e076

Browse files
committed
new
1 parent 84e8f1f commit 996e076

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
@@ -6667,7 +6667,7 @@ def narrow_type_by_identity_equality(
66676667
elif operator in {"==", "!="}:
66686668
is_target_for_value_narrowing = is_singleton_equality_type
66696669

6670-
should_coerce_literals = False
6670+
should_coerce_literals = True
66716671
for i in expr_indices:
66726672
typ = get_proper_type(operand_types[i])
66736673
if is_literal_type_like(typ) or (isinstance(typ, Instance) and typ.type.is_enum):

0 commit comments

Comments
 (0)