MCPcopy Create free account
hub / github.com/InternRobotics/G2VLM / __getattr__

Function __getattr__

eval_code/recons/models/moge/utils3d/numpy/__init__.py:121–135  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

119__all__ = list(itertools.chain(*__modules_all__.values()))
120
121def __getattr__(name):
122 try:
123 return globals()[name]
124 except KeyError:
125 pass
126
127 try:
128 module_name = next(m for m in __modules_all__ if name in __modules_all__[m])
129 except StopIteration:
130 raise AttributeError(f"module '{__name__}' has no attribute '{name}'")
131 module = importlib.import_module(f'.{module_name}', __name__)
132 for key in __modules_all__[module_name]:
133 globals()[key] = getattr(module, key)
134
135 return globals()[name]
136
137
138if TYPE_CHECKING:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected