Skip to content

Commit 09a0db0

Browse files
committed
check primer
1 parent e9c1274 commit 09a0db0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mypy/checker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6736,7 +6736,8 @@ def narrow_type_by_identity_equality(
67366736
# However, for non-value targets, we cannot do this narrowing,
67376737
# and so we ignore else_map
67386738
# e.g. if (x: str | None) != (y: str), we cannot narrow x to None
6739-
all_if_maps.append(if_map)
6739+
if if_map is not None: # TODO: this is incorrect
6740+
all_if_maps.append(if_map)
67406741

67416742
# Handle narrowing for operands with custom __eq__ methods specially
67426743
# In most cases, we won't be able to do any narrowing

0 commit comments

Comments
 (0)