MCPcopy Index your code
hub / github.com/pytest-dev/pytest / get_default_arg_names

Function get_default_arg_names

src/_pytest/compat.py:176–185  ·  view source on GitHub ↗
(function: Callable[..., Any])

Source from the content-addressed store, hash-verified

174
175
176def get_default_arg_names(function: Callable[..., Any]) -> tuple[str, ...]:
177 # Note: this code intentionally mirrors the code at the beginning of
178 # getfuncargnames, to get the arguments which were excluded from its result
179 # because they had default values.
180 return tuple(
181 p.name
182 for p in signature(function).parameters.values()
183 if p.kind in (Parameter.POSITIONAL_OR_KEYWORD, Parameter.KEYWORD_ONLY)
184 and p.default is not Parameter.empty
185 )
186
187
188_non_printable_ascii_translate_table = {

Callers 1

Calls 1

signatureFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…