module documentation

Helpers to help the helpers.

Function ast2apiobject implementation is duplicate safe.
Function is_typing_annotation Whether this annotation node refers to a typing alias.
Function is_using_annotations Detect if this expr is firstly composed by one of the specified annotation(s)' full name.
Function is_using_typing_classvar Undocumented
Function is_using_typing_final Undocumented
Constant SUBSCRIPTABLE_CLASSES_PEP585 Undocumented
Constant TYPING_ALIAS Undocumented
def ast2apiobject(root, node): (source)

implementation is duplicate safe.

Parameters
root:_model.TreeRootUndocumented
node:Union[astroid.nodes.ClassDef, astroid.nodes.Module]Undocumented
Returns
Optional[Union[pydocspec.Class, pydocspec.Module]]Undocumented
def is_typing_annotation(node, ctx): (source)

Whether this annotation node refers to a typing alias.

Parameters
node:astroid.nodes.NodeNGUndocumented
ctx:pydocspec.ApiObjectUndocumented
Returns
boolUndocumented
def is_using_annotations(expr, annotations, ctx): (source)

Detect if this expr is firstly composed by one of the specified annotation(s)' full name.

Parameters
expr:Optional[astroid.nodes.NodeNG]Undocumented
annotations:Sequence[str]Undocumented
ctx:pydocspec.ApiObjectUndocumented
Returns
boolUndocumented
def is_using_typing_classvar(expr, ctx): (source)

Undocumented

Parameters
expr:Optional[astroid.nodes.NodeNG]Undocumented
ctx:pydocspec.ApiObjectUndocumented
Returns
boolUndocumented
def is_using_typing_final(expr, ctx): (source)

Undocumented

Parameters
expr:Optional[astroid.nodes.NodeNG]Undocumented
ctx:pydocspec.ApiObjectUndocumented
Returns
boolUndocumented
SUBSCRIPTABLE_CLASSES_PEP585: tuple[str, ...] = (source)

Undocumented

Value
('tuple',
 'list',
 'dict',
 'set',
 'frozenset',
 'type',
 'collections.deque',
...
TYPING_ALIAS: tuple[str, ...] = (source)

Undocumented

Value
('typing.Hashable',
 'typing.Awaitable',
 'typing.Coroutine',
 'typing.AsyncIterable',
 'typing.AsyncIterator',
 'typing.Iterable',
 'typing.Iterator',
...