__init__.py 692 B

123456789101112131415161718192021222324
  1. """
  2. Import all submodules main classes into the package space
  3. """
  4. # flake8: noqa
  5. import inspect
  6. from .base import *
  7. from .blob import *
  8. from .commit import *
  9. from .submodule import util as smutil
  10. from .submodule.base import *
  11. from .submodule.root import *
  12. from .tag import *
  13. from .tree import *
  14. # Fix import dependency - add IndexObject to the util module, so that it can be
  15. # imported by the submodule.base
  16. smutil.IndexObject = IndexObject # type: ignore[attr-defined]
  17. smutil.Object = Object # type: ignore[attr-defined]
  18. del smutil
  19. # must come after submodule was made available
  20. __all__ = [name for name, obj in locals().items() if not (name.startswith("_") or inspect.ismodule(obj))]