Skip to content

Commit c946906

Browse files
committed
Improve order of imports and __all__ in git.objects.*
But not yet in git.objects.submodule.* modules.
1 parent 0ba06e9 commit c946906

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

Diff for: git/objects/submodule/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
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+
__all__ = ["Submodule", "UpdateProgress"]
5+
46
import gc
57
from io import BytesIO
68
import logging
@@ -68,8 +70,6 @@
6870

6971
# -----------------------------------------------------------------------------
7072

71-
__all__ = ["Submodule", "UpdateProgress"]
72-
7373
_logger = logging.getLogger(__name__)
7474

7575

Diff for: git/objects/submodule/root.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
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+
__all__ = ["RootModule", "RootUpdateProgress"]
5+
46
import logging
57

68
import git
79
from git.exc import InvalidGitRepositoryError
10+
811
from .base import Submodule, UpdateProgress
912
from .util import find_first_remote_branch
1013

@@ -20,8 +23,6 @@
2023

2124
# ----------------------------------------------------------------------------
2225

23-
__all__ = ["RootModule", "RootUpdateProgress"]
24-
2526
_logger = logging.getLogger(__name__)
2627

2728

Diff for: git/objects/submodule/util.py

+11-13
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
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-
import git
5-
from git.exc import InvalidGitRepositoryError
6-
from git.config import GitConfigParser
4+
__all__ = (
5+
"sm_section",
6+
"sm_name",
7+
"mkhead",
8+
"find_first_remote_branch",
9+
"SubmoduleConfigParser",
10+
)
11+
712
from io import BytesIO
813
import weakref
914

15+
import git
16+
from git.config import GitConfigParser
17+
from git.exc import InvalidGitRepositoryError
1018

1119
# typing -----------------------------------------------------------------------
1220

@@ -22,15 +30,6 @@
2230
from git import Remote
2331
from git.refs import RemoteReference
2432

25-
26-
__all__ = (
27-
"sm_section",
28-
"sm_name",
29-
"mkhead",
30-
"find_first_remote_branch",
31-
"SubmoduleConfigParser",
32-
)
33-
3433
# { Utilities
3534

3635

@@ -65,7 +64,6 @@ def find_first_remote_branch(remotes: Sequence["Remote"], branch_name: str) -> "
6564

6665
# } END utilities
6766

68-
6967
# { Classes
7068

7169

0 commit comments

Comments
 (0)