(function: Callable[..., Any])
| 198 | |
| 199 | |
| 200 | def get_default_arg_names(function: Callable[..., Any]) -> Tuple[str, ...]: |
| 201 | # Note: this code intentionally mirrors the code at the beginning of |
| 202 | # getfuncargnames, to get the arguments which were excluded from its result |
| 203 | # because they had default values. |
| 204 | return tuple( |
| 205 | p.name |
| 206 | for p in signature(function).parameters.values() |
| 207 | if p.kind in (Parameter.POSITIONAL_OR_KEYWORD, Parameter.KEYWORD_ONLY) |
| 208 | and p.default is not Parameter.empty |
| 209 | ) |
| 210 | |
| 211 | |
| 212 | _non_printable_ascii_translate_table = { |
no outgoing calls
no test coverage detected