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

Commitde540b7

Browse files
committed
Add __all__ and imports in git.objects.submodule
This is the top-level of the git.objects.submodule subpackage, forits own Python submodules.This appears only not to have been done before because of a cyclicimport problem involving imports that are no longer present. Doingit improves consistency, since all the other subpackages under thetop-level git package already do this.The modattrs.py script reveals the four new attributes ofgit.objects.submodule for the four classes obtained by the newimports, as expected. (The explicit module imports do not changethe attribues because they are the same attributes as come intoexistence due to those Python submodules being imported anywhere inany style.)
1 parent3786307 commitde540b7

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

‎git/objects/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from .baseimportIndexObject,Object
2727
from .blobimportBlob
2828
from .commitimportCommit
29-
from .submodule.baseimportSubmodule,UpdateProgress
30-
from .submodule.rootimportRootModule,RootUpdateProgress
29+
from .submoduleimportRootModule,RootUpdateProgress,Submodule,UpdateProgress
3130
from .tagimportTagObject
3231
from .treeimportTree,TreeModifier

‎git/objects/submodule/__init__.py

Lines changed: 13 additions & 2 deletions
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 .importbase,root,util
15+
from .baseimportSubmodule,UpdateProgress
16+
from .rootimportRootModule,RootUpdateProgress

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp