Skip to content

Commit d11ee1d

Browse files
committed
variant
1 parent 42631be commit d11ee1d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mypy/join.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def visit_callable_type(self, t: CallableType) -> ProperType:
415415
return join_types(t.fallback, self.s)
416416
else:
417417
s, t = self.s, t
418-
if s.min_args < t.min_args:
418+
if t.is_var_arg:
419419
s, t = t, s
420420
if is_subtype(self.s, t):
421421
result = t.copy_modified()

test-data/unit/check-functions.test

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3503,8 +3503,8 @@ fdict = {
35033503
"f_any": f_any,
35043504
"f_3": f_3,
35053505
}
3506-
reveal_type(fdict) # N: Revealed type is "builtins.dict[builtins.str, def (*_: Any, **__: Any) -> Any]"
3506+
reveal_type(fdict) # N: Revealed type is "builtins.dict[builtins.str, def (common: Any, a: Any =) -> Any]"
35073507

3508-
reveal_type(join(f_1, f_any, f_3)) # N: Revealed type is "def (*_: Any, **__: Any) -> Any"
3508+
reveal_type(join(f_1, f_any, f_3)) # N: Revealed type is "def (common: Any, a: Any =) -> Any"
35093509

35103510
[builtins fixtures/tuple.pyi]

0 commit comments

Comments
 (0)