INNER CODE UNIT · Python
__getattr__
mikel-brostrom/boxmot · boxmot/__init__.py:66
def __getattr__(name: str):
if name in _EXPORTS:
module_name, attr_name = _EXPORTS[name]
value = getattr(import_module(module_name), attr_name)
globals()[name] = value
return value
raise AttributeError(f"module 'boxmot' has no attribute {name!r}")
def __dir__() -> list[str]:
return sorted(set(globals()) | set(__all__))