Skip to content

Commit 5bd1c4c

Browse files
committed
fix #16935 strike that: use tuple fallback as tuple[X,...] fallback
... the original fallback ABCMeta is "correct" in that it aligns with the (abstract) base class of builtins.tuple. But rather than explicitly specify abc.ABCMeta as fallback, use the same fallback as the type we're applying arguments to (and that is abc.ABCMeta in our "tuple" case)
1 parent 7a39ef5 commit 5bd1c4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/checkexpr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4844,9 +4844,9 @@ def apply_type_arguments_to_callable(
48444844
return CallableType(
48454845
[TupleType(list(args), self.chk.named_type("tuple"))],
48464846
[ARG_POS],
4847-
["p1"],
4847+
[None],
48484848
TupleType(list(args), self.chk.named_type("tuple")),
4849-
self.chk.named_type("builtins.type"),
4849+
tp.fallback,
48504850
name="tuple",
48514851
definition=tp.definition,
48524852
bound_args=tp.bound_args,

0 commit comments

Comments
 (0)