File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8032,7 +8032,8 @@ def get_type_range_of_type(self, typ: Type) -> TypeRange | None:
80328032 return None
80338033 # Filter out None and UninhabitedType entries (type checkers need explicit None check)
80348034 valid_ranges = [
8035- t for t in type_ranges
8035+ t
8036+ for t in type_ranges
80368037 if t is not None and not isinstance (get_proper_type (t .item ), UninhabitedType )
80378038 ]
80388039 if not valid_ranges :
@@ -8042,7 +8043,10 @@ def get_type_range_of_type(self, typ: Type) -> TypeRange | None:
80428043 # to avoid narrowing to a useless type.
80438044 item = make_simplified_union ([t .item for t in valid_ranges ])
80448045 proper_item = get_proper_type (item )
8045- if isinstance (proper_item , Instance ) and proper_item .type .fullname == "builtins.object" :
8046+ if (
8047+ isinstance (proper_item , Instance )
8048+ and proper_item .type .fullname == "builtins.object"
8049+ ):
80468050 return None
80478051 return TypeRange (item , is_upper_bound = True )
80488052 if isinstance (typ , FunctionLike ) and typ .is_type_obj ():
You can’t perform that action at this time.
0 commit comments