hybrid ¤
Deprecated. This extension provides an hybrid behavior while loading data.
Classes:
-
HybridExtension
–Inspect during a visit.
HybridExtension ¤
HybridExtension(
extensions: Sequence[
str
| dict[str, Any]
| InspectorExtension
| type[InspectorExtension]
],
object_paths: Sequence[str | Pattern] | None = None,
)
flowchart TD
griffe.extensions.hybrid.HybridExtension[HybridExtension]
griffe.extensions.base.VisitorExtension[VisitorExtension]
griffe.extensions.base.VisitorExtension --> griffe.extensions.hybrid.HybridExtension
click griffe.extensions.hybrid.HybridExtension href "" "griffe.extensions.hybrid.HybridExtension"
click griffe.extensions.base.VisitorExtension href "" "griffe.extensions.base.VisitorExtension"
Inspect during a visit.
This extension accepts the name of another extension (an inspector) and runs it appropriately. It allows to inspect objects after having visited them, so as to extract more data.
Indeed, during the visit, an object might be seen as a simple attribute (assignment), when in fact it's a function or a class dynamically constructed. In this case, inspecting it will provide the desired data.
Parameters:
-
extensions
(Sequence[str | dict[str, Any] | InspectorExtension | type[InspectorExtension]]
) –The names or configurations of other inspector extensions.
-
object_paths
(Sequence[str | Pattern] | None
, default:None
) –Optional list of regular expressions to match against objects paths, to select which objects to inspect.
Raises:
-
ExtensionError
–When the passed extension is not an inspector extension.
Methods: