(self, attrname: str)
| 260 | return None |
| 261 | |
| 262 | def __getattribute__(self, attrname: str) -> Any: |
| 263 | |
| 264 | # get attribute of the SoftLink itself |
| 265 | if ( |
| 266 | attrname in SoftLink._link_attrnames |
| 267 | or attrname[:3] in SoftLink._link_attrprefixes |
| 268 | ): |
| 269 | return object.__getattribute__(self, attrname) |
| 270 | |
| 271 | # get attribute of the target node |
| 272 | elif not self._v_isopen: |
| 273 | raise tb.ClosedNodeError("the node object is closed") |
| 274 | elif self.is_dangling(): |
| 275 | return None |
| 276 | else: |
| 277 | target_node = self.dereference() |
| 278 | try: |
| 279 | # __getattribute__() fails to get children of Groups |
| 280 | return target_node.__getattribute__(attrname) |
| 281 | except AttributeError: |
| 282 | # some node classes (e.g. Array) don't implement __getattr__() |
| 283 | return target_node.__getattr__(attrname) |
| 284 | |
| 285 | def __setattr__(self, attrname: str, value: Any) -> None: |
| 286 |
nothing calls this directly
no test coverage detected