We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
resolved
1 parent 20ff7b6 commit 9b5ca45Copy full SHA for 9b5ca45
src/griffe/expressions.py
@@ -607,6 +607,14 @@ def canonical_path(self) -> str:
607
except NameResolutionError:
608
return self.name
609
610
+ @property
611
+ def resolved(self) -> Module | Class | None:
612
+ """The resolved object this name refers to."""
613
+ try:
614
+ return self.parent.modules_collection[self.parent.resolve(self.name)] # type: ignore[union-attr]
615
+ except Exception: # noqa: BLE001
616
+ return self.parent.resolved[self.name] # type: ignore[union-attr,index]
617
+
618
@property
619
def is_enum_class(self) -> bool:
620
"""Whether this name resolves to an enumeration class."""
0 commit comments