Return sorted copy of the list of signatures found so far.
(self)
| 370 | self.accumulator = "" |
| 371 | |
| 372 | def get_signatures(self) -> list[FunctionSig]: |
| 373 | """Return sorted copy of the list of signatures found so far.""" |
| 374 | |
| 375 | def has_arg(name: str, signature: FunctionSig) -> bool: |
| 376 | return any(x.name == name for x in signature.args) |
| 377 | |
| 378 | def args_kwargs(signature: FunctionSig) -> bool: |
| 379 | return has_arg("*args", signature) and has_arg("**kwargs", signature) |
| 380 | |
| 381 | # Move functions with (*args, **kwargs) in their signature to last place. |
| 382 | return sorted(self.signatures, key=lambda x: 1 if args_kwargs(x) else 0) |
| 383 | |
| 384 | |
| 385 | def infer_sig_from_docstring(docstr: str | None, name: str) -> list[FunctionSig] | None: |
no test coverage detected