Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc946906

Browse files
committed
Improve order of imports and __all__ in git.objects.*
But not yet in git.objects.submodule.* modules.
1 parent0ba06e9 commitc946906

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

‎git/objects/submodule/base.py

Lines changed: 2 additions & 2 deletions
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
importgc
57
fromioimportBytesIO
68
importlogging
@@ -68,8 +70,6 @@
6870

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

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

7575

‎git/objects/submodule/root.py

Lines changed: 3 additions & 2 deletions
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
importlogging
57

68
importgit
79
fromgit.excimportInvalidGitRepositoryError
10+
811
from .baseimportSubmodule,UpdateProgress
912
from .utilimportfind_first_remote_branch
1013

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

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

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

2728

‎git/objects/submodule/util.py

Lines changed: 11 additions & 13 deletions
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-
importgit
5-
fromgit.excimportInvalidGitRepositoryError
6-
fromgit.configimportGitConfigParser
4+
__all__= (
5+
"sm_section",
6+
"sm_name",
7+
"mkhead",
8+
"find_first_remote_branch",
9+
"SubmoduleConfigParser",
10+
)
11+
712
fromioimportBytesIO
813
importweakref
914

15+
importgit
16+
fromgit.configimportGitConfigParser
17+
fromgit.excimportInvalidGitRepositoryError
1018

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

@@ -22,15 +30,6 @@
2230
fromgitimportRemote
2331
fromgit.refsimportRemoteReference
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)

[8]ページ先頭

©2009-2025 Movatter.jp