File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -2714,10 +2714,13 @@ def check_overload_call(
27142714 # See https://github.com/python/mypy/issues/14764#issuecomment-3054510950
27152715 # And https://typing.python.org/en/latest/spec/overload.html#argument-type-expansion
27162716 arg_types = [
2717- try_expanding_sum_type_to_union (arg_type , arg_type .type .fullname )
2718- if isinstance (arg_type , Instance ) else arg_type
2719- for arg_type in arg_types
2720- ]
2717+ (
2718+ try_expanding_sum_type_to_union (arg_type , arg_type .type .fullname )
2719+ if isinstance (arg_type , Instance )
2720+ else arg_type
2721+ )
2722+ for arg_type in arg_types
2723+ ]
27212724
27222725 # Step 1: Filter call targets to remove ones where the argument counts don't match
27232726 plausible_targets = self .plausible_overload_call_targets (
Original file line number Diff line number Diff line change @@ -1050,7 +1050,6 @@ class Status(Enum):
10501050 ]
10511051 return make_simplified_union (items , contract_literals = False )
10521052
1053-
10541053 if isinstance (typ , Instance ) and typ .type .fullname == target_fullname :
10551054 if isinstance (typ .last_known_value , LiteralType ):
10561055 # fallback for Literal[True] and Literal[False]
You can’t perform that action at this time.
0 commit comments