(
self,
sigs: list[FunctionSig],
is_coroutine: bool = False,
decorators: list[str] | None = None,
docstring: str | None = None,
)
| 784 | return default_type |
| 785 | |
| 786 | def format_func_def( |
| 787 | self, |
| 788 | sigs: list[FunctionSig], |
| 789 | is_coroutine: bool = False, |
| 790 | decorators: list[str] | None = None, |
| 791 | docstring: str | None = None, |
| 792 | ) -> list[str]: |
| 793 | lines: list[str] = [] |
| 794 | if decorators is None: |
| 795 | decorators = [] |
| 796 | |
| 797 | for signature in sigs: |
| 798 | # dump decorators, just before "def ..." |
| 799 | for deco in decorators: |
| 800 | lines.append(f"{self._indent}{deco}") |
| 801 | |
| 802 | lines.append( |
| 803 | signature.format_sig( |
| 804 | indent=self._indent, |
| 805 | is_async=is_coroutine, |
| 806 | docstring=docstring, |
| 807 | include_docstrings=self._include_docstrings, |
| 808 | ) |
| 809 | ) |
| 810 | return lines |
| 811 | |
| 812 | def format_type_args(self, o: TypeAliasStmt | FuncDef | ClassDef) -> str: |
| 813 | if not o.type_args: |
no test coverage detected