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 6cb8e79 commit a0e722eCopy full SHA for a0e722e
mypy/checker.py
@@ -6807,8 +6807,11 @@ def narrow_type_by_equality(
6807
# For final classes, we can narrow in the else branch too since
6808
# no subclasses can exist. Otherwise, clear the else_map.
6809
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):
+ if not (
+ isinstance(target_type, CallableType)
6812
+ and target_type.is_type_obj()
6813
+ and target_type.type_object().is_final
6814
+ ):
6815
else_map = {}
6816
partial_type_maps.append((if_map, else_map))
6817
0 commit comments