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

Function __getattr__

sdk/python/agent_sandbox/browser/__init__.py:51–62  ·  view source on GitHub ↗
(attr_name: str)

Source from the content-addressed store, hash-verified

49
50
51def __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
65def __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…