HasReturns
Process `Returns` section, if it exists. Used in `DocumentedFunction`.
Methods
__init__(self, obj : griffe.Function) -> None
Parameters
- Name
self
- Type
- Default
- Description
- Name
obj
- Type
- griffe.Function
- Default
- Description
get_docstring(self, kind : str) -> typing.Optional[str]
Extract a `griffe.DocstringSection` of a given `kind`s parsed value.
Parameters
- Name
self
- Type
- Default
- Description
- Name
kind
- Type
- str
- Default
- Description
The kind of `griffe.DocstringSection` to extract. Valid values are `text`, `parameters`, `returns`, `raises`, and `examples`.
Response
- Type
- typing.Optional[str]
- Description
Attributes
- Name
obj
- Type
- Value
= obj
- Description
- Name
returns
- Type
- typing.Optional[DescriptionAndAnnotation]
- Value
= None
- Description