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 b327557 commit 8be0188Copy full SHA for 8be0188
mypy/checker.py
@@ -5655,7 +5655,7 @@ def has_no_custom_eq_checks(t: Type) -> bool:
5655
) and not custom_special_method(t, "__ne__", check_all=False)
5656
5657
is_valid_target = is_exactly_literal_type
5658
- coerce_only_in_literal_context = True
+ coerce_only_in_literal_context = False
5659
5660
expr_types = [operand_types[i] for i in expr_indices]
5661
should_narrow_by_identity = all(map(has_no_custom_eq_checks, expr_types))
0 commit comments