API Reference
Contents
API Reference¶
parse_docstring¶
- docstring_utils.parse_docstring(func: Callable[[...], Any], *, filter_args: bool = False) docstring_utils.parsed_docstring.ParsedDocstring ¶
Parses the docstring of a function into a dictionary
- Parameters
func (Callable[..., Any]) – The function to parse the docstring of
filter_args (
bool
) – Whether to filter out arguments that are not in the function signature
- Returns
The parsed docstring
- Return type
ParsedDocstring¶
Attributes
- class docstring_utils.ParsedDocstring(docstring: str, parsed_docstring: Dict[str, Any])¶
Class representing a docstring that has been parsed.
- property args: Dict[str, docstring_utils.parsed_docstring.ParsedArgument]¶
The parsed arguments.
- Type
Dict[
str
,ParsedArgument
]
- property return_value: docstring_utils.parsed_docstring.ParsedReturnValue¶
The parsed return value.
- Type
ParsedReturnValue¶
Attributes