Skip to content

Commit

Permalink
Extract fix from #14181
Browse files Browse the repository at this point in the history
  • Loading branch information
JukkaL committed Nov 25, 2022
1 parent 7bb0cdc commit 2a1ab2d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mypy/checkexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -3968,6 +3968,8 @@ def apply_type_arguments_to_callable(
tp = get_proper_type(tp)

if isinstance(tp, CallableType):
if tp.is_type_obj() and tp.type_object().fullname == "builtins.tuple":
return tp
if len(tp.variables) != len(args):
self.msg.incompatible_type_application(len(tp.variables), len(args), ctx)
return AnyType(TypeOfAny.from_error)
Expand Down

0 comments on commit 2a1ab2d

Please sign in to comment.