Skip to content

Commit a0e722e

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 6cb8e79 commit a0e722e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

mypy/checker.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6807,8 +6807,11 @@ def narrow_type_by_equality(
68076807
# For final classes, we can narrow in the else branch too since
68086808
# no subclasses can exist. Otherwise, clear the else_map.
68096809
target_type = get_proper_type(target.item)
6810-
if not (isinstance(target_type, CallableType) and target_type.is_type_obj()
6811-
and target_type.type_object().is_final):
6810+
if not (
6811+
isinstance(target_type, CallableType)
6812+
and target_type.is_type_obj()
6813+
and target_type.type_object().is_final
6814+
):
68126815
else_map = {}
68136816
partial_type_maps.append((if_map, else_map))
68146817

0 commit comments

Comments
 (0)