class documentation

class AttributeDocstrings(ast.NodeVisitor): (source)

View In Hierarchy

An ast.NodeVisitor that collects attribute docstrings.

Method get_attr_docs Get attribute docstrings from the given component.
Method visit Undocumented
Instance Variable attr_docs Undocumented
Instance Variable prev_attr Undocumented
def get_attr_docs(self, component: T.Any) -> dict[str, tuple[str, str | None, str | None]]: (source)

Get attribute docstrings from the given component.

Parameters
component:T.Anycomponent to process (class or module)
Returns
dict[str, tuple[str, str | None, str | None]]for each attribute docstring, a tuple with (description, type, default)
def visit(self, node): (source)

Undocumented

attr_docs: dict = (source)

Undocumented

prev_attr = (source)

Undocumented