Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b510b4

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, seehttps://pre-commit.ci
1 parent598fe28 commit9b510b4

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

‎mypy/checkexpr.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff 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-
ifisinstance(arg_type,Instance)elsearg_type
2719-
forarg_typeinarg_types
2720-
]
2717+
(
2718+
try_expanding_sum_type_to_union(arg_type,arg_type.type.fullname)
2719+
ifisinstance(arg_type,Instance)
2720+
elsearg_type
2721+
)
2722+
forarg_typeinarg_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(

‎mypy/typeops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,6 @@ class Status(Enum):
10501050
]
10511051
returnmake_simplified_union(items,contract_literals=False)
10521052

1053-
10541053
ifisinstance(typ,Instance)andtyp.type.fullname==target_fullname:
10551054
ifisinstance(typ.last_known_value,LiteralType):
10561055
# fallback for Literal[True] and Literal[False]

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp