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(
2714
2714
# See https://github.com/python/mypy/issues/14764#issuecomment-3054510950
2715
2715
# And https://typing.python.org/en/latest/spec/overload.html#argument-type-expansion
2716
2716
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
+ ]
2721
2724
2722
2725
# Step 1: Filter call targets to remove ones where the argument counts don't match
2723
2726
plausible_targets = self .plausible_overload_call_targets (
Original file line number Diff line number Diff line change @@ -1050,7 +1050,6 @@ class Status(Enum):
1050
1050
]
1051
1051
return make_simplified_union (items , contract_literals = False )
1052
1052
1053
-
1054
1053
if isinstance (typ , Instance ) and typ .type .fullname == target_fullname :
1055
1054
if isinstance (typ .last_known_value , LiteralType ):
1056
1055
# fallback for Literal[True] and Literal[False]
You can’t perform that action at this time.
0 commit comments