Get the underlying Python object. May be overwritten by subclasses.
(self)
| 302 | self._obj = value |
| 303 | |
| 304 | def _getobj(self): |
| 305 | """Get the underlying Python object. May be overwritten by subclasses.""" |
| 306 | # TODO: Improve the type of `parent` such that assert/ignore aren't needed. |
| 307 | assert self.parent is not None |
| 308 | obj = self.parent.obj # type: ignore[attr-defined] |
| 309 | return getattr(obj, self.name) |
| 310 | |
| 311 | def getmodpath(self, stopatmodule: bool = True, includemodule: bool = False) -> str: |
| 312 | """Return Python path relative to the containing module.""" |