(function: Callable[..., Any])
| 174 | |
| 175 | |
| 176 | def 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 = { |
no test coverage detected
searching dependent graphs…