Skip to content

Commit 4588d73

Browse files
committed
Add __all__ and imports in git.objects.submodule
This is the top-level of the git.objects.submodule subpackage, for its own Python submodules. This appears only not to have been done before because of a cyclic import problem involving imports that are no longer present.
1 parent eaed175 commit 4588d73

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

git/objects/__init__.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from .base import IndexObject, Object
2727
from .blob import Blob
2828
from .commit import Commit
29-
from .submodule.base import Submodule, UpdateProgress
30-
from .submodule.root import RootModule, RootUpdateProgress
29+
from .submodule import RootModule, RootUpdateProgress, Submodule, UpdateProgress
3130
from .tag import TagObject
3231
from .tree import Tree, TreeModifier

git/objects/submodule/__init__.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# This module is part of GitPython and is released under the
22
# 3-Clause BSD License: https://opensource.org/license/bsd-3-clause/
33

4-
# NOTE: Cannot import anything here as the top-level __init__ has to handle
5-
# our dependencies.
4+
__all__ = [
5+
"base",
6+
"root",
7+
"util",
8+
"Submodule",
9+
"UpdateProgress",
10+
"RootModule",
11+
"RootUpdateProgress",
12+
]
13+
14+
from . import base, root, util
15+
from .base import Submodule, UpdateProgress
16+
from .root import RootModule, RootUpdateProgress

0 commit comments

Comments
 (0)