INNER CODE UNIT · Python
_ensure_submodules_loaded
google-antigravity/antigravity-sdk-python · google/antigravity/beta/__init__.py:267
def _ensure_submodules_loaded() -> None:
"""Lazily walks and imports SDK submodules so all `@beta` decorators have executed."""
global _LAZY_SUBMODULES_LOADED
if _LAZY_SUBMODULES_LOADED:
return
_LAZY_SUBMODULES_LOADED = True
parent_pkg_name = (__package__ or __name__).rpartition(".")[0]
if not parent_pkg_name:
return
try:
parent_pkg = importlib.import_module(parent_pkg_name)
except ImportError:
return
pkg_path = getattr(parent_pkg, "__path__", None)
if not pkg_path:
return
def _walk_sdk_modules(paths: Any, prefix: str) -> None: