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

Method kw_arg

mypy/types.py:1985–1990  ·  view source on GitHub ↗

The formal argument for **kwargs.

(self)

Source from the content-addressed store, hash-verified

1983 return None
1984
1985 def kw_arg(self) -> FormalArgument | None:
1986 """The formal argument for **kwargs."""
1987 for position, (type, kind) in enumerate(zip(self.arg_types, self.arg_kinds)):
1988 if kind == ARG_STAR2:
1989 return FormalArgument(None, position, type, False)
1990 return None
1991
1992 def formal_arguments(self, include_star_args: bool = False) -> list[FormalArgument]:
1993 """Yields the formal arguments corresponding to this callable, ignoring *arg and **kwargs.

Calls 3

enumerateFunction · 0.85
zipFunction · 0.85
FormalArgumentClass · 0.85

Tested by 1