(obj: object, name: str, ann: str)
| 91 | |
| 92 | |
| 93 | def annotated_getattr(obj: object, name: str, ann: str) -> object: |
| 94 | try: |
| 95 | obj = getattr(obj, name) |
| 96 | except AttributeError as e: |
| 97 | raise AttributeError( |
| 98 | f"{type(obj).__name__!r} object at {ann} has no attribute {name!r}" |
| 99 | ) from e |
| 100 | return obj |
| 101 | |
| 102 | |
| 103 | def derive_importpath(import_path: str, raising: bool) -> tuple[str, object]: |
no outgoing calls
no test coverage detected