DocumentedPackage
- MRO
- ⎿⎽⎽HasDocstring
- ⎿⎽⎽⎽DocumentedItem
- ⎿⎽⎽⎽⎽DocumentedPackage
Methods
__init__(self, obj : GriffeObjType) -> None
Parameters
- Name
self
- Type
- Default
- Description
- Name
obj
- Type
- GriffeObjType
- Default
- Description
as_dict(self) -> dict
Response
- Type
- dict
- 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
classes
- Type
- Value
= [get_name(m) for m in obj.classes.values()]
- Description
- Name
packages
- Type
- Value
= [get_name(m) for m in obj.modules.values()]
- Description
- Name
obj
- Type
- Value
= obj
- Description
- Name
type
- Type
- Value
= type_
- Description
- Name
name
- Type
- Value
= get_name(obj)
- Description
- Name
path
- Type
- Value
= str(obj.relative_package_filepath)
- Description
- Name
parent
- Type
- Value
= obj.parent if obj.parent is None else get_name(obj.parent)
- Description
- Name
description
- Type
- Value
= self.get_docstring('text')
- Description
- Name
lines
- Type
- Value
= () if self.type == 'package' else (obj.lineno, obj.endlineno)
- Description
- Name
attributes
- Type
- list[str]
- Value
= None
- Description
- Name
functions
- Type
- list[str]
- Value
= None
- Description