griffe_typingdoc ¤
Griffe TypingDoc package.
Griffe extension for PEP 727 - Documentation Metadata in Typing.
Modules:
-
debug
–Debugging utilities.
Classes:
-
TypingDocExtension
–Griffe extension that reads documentation from
typing.Doc
.
TypingDocExtension ¤
TypingDocExtension()
Bases: Extension
Griffe extension that reads documentation from typing.Doc
.
Methods:
-
on_attribute_instance
–Post-process Griffe attributes to create their docstring.
-
on_function_instance
–Post-process Griffe functions to add a parameters section.
-
on_package_loaded
–Post-process Griffe packages recursively (non-yet handled objects only).
Source code in src/griffe_typingdoc/_extension.py
21 22 |
|
on_attribute_instance ¤
on_attribute_instance(
*,
node: AST | ObjectNode,
attr: Attribute,
**kwargs: Any
) -> None
Post-process Griffe attributes to create their docstring.
It applies only for dynamic analysis.
Parameters:
-
node
(AST | ObjectNode
) –The object/AST node describing the attribute or its definition.
-
attr
(Attribute
) –The Griffe attribute just instantiated.
-
**kwargs
(Any
, default:{}
) –
Source code in src/griffe_typingdoc/_extension.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 |
|
on_function_instance ¤
on_function_instance(
*, node: AST | ObjectNode, func: Function, **kwargs: Any
) -> None
Post-process Griffe functions to add a parameters section.
It applies only for dynamic analysis.
Parameters:
-
node
(AST | ObjectNode
) –The object/AST node describing the function or its definition.
-
func
(Function
) –The Griffe function just instantiated.
-
**kwargs
(Any
, default:{}
) –
Source code in src/griffe_typingdoc/_extension.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 |
|
on_package_loaded ¤
on_package_loaded(*, pkg: Module, **kwargs: Any) -> None
Post-process Griffe packages recursively (non-yet handled objects only).
Parameters:
-
pkg
(Module
) –The top-level module representing a package.
-
**kwargs
(Any
, default:{}
) –
Source code in src/griffe_typingdoc/_extension.py
116 117 118 119 120 121 122 123 124 125 126 |
|