MCPcopy
hub / github.com/agent-infra/sandbox / __getattr__

Function __getattr__

sdk/python/agent_sandbox/__init__.py:535–546  ·  view source on GitHub ↗
(attr_name: str)

Source from the content-addressed store, hash-verified

533
534
535def __getattr__(attr_name: str) -> typing.Any:
536 module_name = _dynamic_imports.get(attr_name)
537 if module_name is None:
538 raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
539 try:
540 module = import_module(module_name, __package__)
541 result = getattr(module, attr_name)
542 return result
543 except ImportError as e:
544 raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
545 except AttributeError as e:
546 raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
547
548
549def __dir__():

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…