MCPcopy Index your code
hub / github.com/python/mypy / var_arg

Method var_arg

mypy/types.py:1978–1983  ·  view source on GitHub ↗

The formal argument for *args.

(self)

Source from the content-addressed store, hash-verified

1976
1977 # TODO: here is a lot of code duplication with Callable type, fix this.
1978 def var_arg(self) -> FormalArgument | None:
1979 """The formal argument for *args."""
1980 for position, (type, kind) in enumerate(zip(self.arg_types, self.arg_kinds)):
1981 if kind == ARG_STAR:
1982 return FormalArgument(None, position, type, False)
1983 return None
1984
1985 def kw_arg(self) -> FormalArgument | None:
1986 """The formal argument for **kwargs."""

Callers 10

check_callable_callMethod · 0.45
is_similar_paramsFunction · 0.45
visit_callable_typeMethod · 0.45
apply_generic_argumentsFunction · 0.45
are_trivial_parametersFunction · 0.45
is_trivial_suffixFunction · 0.45

Calls 3

enumerateFunction · 0.85
zipFunction · 0.85
FormalArgumentClass · 0.85

Tested by 1