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

Function __getattr__

eval_code/recons/models/moge/utils3d/torch/__init__.py:124–138  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected