DocArgument
ClassDataClassSource
DocArgument(
name: str,
type: str,
p_type: ParameterKind = ParameterKind.POSITIONAL_OR_KEYWORD,
default: str = "",
doc: list[str] = []
)
The docstring of a function/method argument.
Fields
| Name | Type | Required | |
|---|---|---|---|
name | str | The name of the argument. | |
type | str | The type of the argument. It is usually the typehint (annotation). | |
p_type | ParameterKind | The argument/parameter type, see inspect._ParameterKind. | |
default | str | The formatted default value of the argument. | |
doc | list[str] | The docstring (line-by-line) of the argument. |
Methods
format_doc
v_1: str = self.format_doc()
Format the docstring.
Returns
| Name | Type | |
|---|---|---|
v_1 | str | The docstring of the current argument. |