(attr_name: str)
| 49 | |
| 50 | |
| 51 | def __getattr__(attr_name: str) -> typing.Any: |
| 52 | module_name = _dynamic_imports.get(attr_name) |
| 53 | if module_name is None: |
| 54 | raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}") |
| 55 | try: |
| 56 | module = import_module(module_name, __package__) |
| 57 | result = getattr(module, attr_name) |
| 58 | return result |
| 59 | except ImportError as e: |
| 60 | raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e |
| 61 | except AttributeError as e: |
| 62 | raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e |
| 63 | |
| 64 | |
| 65 | def __dir__(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…