From ef341570bc7512c032de7a958c3e09872a8c621f Mon Sep 17 00:00:00 2001 From: bzoracler <50305397+bzoracler@users.noreply.github.com> Date: Mon, 6 May 2024 22:20:01 +1200 Subject: [PATCH] fix: annotated argument's `var` node type is explicit, not inferred --- mypy/fastparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/fastparse.py b/mypy/fastparse.py index e208e4d0b7d98..7e2ba7b712b24 100644 --- a/mypy/fastparse.py +++ b/mypy/fastparse.py @@ -1099,7 +1099,7 @@ def make_argument( if argument_elide_name(arg.arg): pos_only = True - argument = Argument(Var(arg.arg), arg_type, self.visit(default), kind, pos_only) + argument = Argument(Var(arg.arg, arg_type), arg_type, self.visit(default), kind, pos_only) argument.set_line( arg.lineno, arg.col_offset,