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

Commit64c9efd

Browse files
committed
Restore relative order to fix circular import error
This still uses all explicit rather than wildcard imports (andstill omits suppressions that are no longer needed due to wildcardimports not being used). But it brings back the old relative orderof the `from ... import ...` statements inside the try-block.Since this fixes the circular import problem, it is possible to runthe modattrs.py script to check for changes. New changes sincereplacing wildcard imports, which are probably undesirable, are theremoval of these attributes pointing to indirect Python submodulesof the git module: base -> git.index.base fun -> git.index.fun head -> git.refs.head log -> git.refs.log reference -> git.refs.reference symbolic -> git.refs.symbolic tag -> git.refs.tag typ -> git.index.typ
1 parent7745250 commit64c9efd

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

‎git/__init__.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -119,27 +119,8 @@
119119
fromgit.typesimportPathLike
120120

121121
try:
122-
fromgit.cmdimportGit# @NoMove
123122
fromgit.compatimportsafe_decode# @NoMove
124123
fromgit.configimportGitConfigParser# @NoMove
125-
fromgit.dbimportGitCmdObjectDB,GitDB# @NoMove
126-
fromgit.diffimport (# @NoMove
127-
INDEX,
128-
NULL_TREE,
129-
Diff,
130-
DiffConstants,
131-
DiffIndex,
132-
Diffable,
133-
)
134-
fromgit.indeximport (# @NoMove
135-
BaseIndexEntry,
136-
BlobFilter,
137-
CheckoutError,
138-
IndexEntry,
139-
IndexFile,
140-
StageType,
141-
util,# noqa: F401 # For backward compatibility.
142-
)
143124
fromgit.objectsimport (# @NoMove
144125
Blob,
145126
Commit,
@@ -164,8 +145,27 @@
164145
Tag,
165146
TagReference,
166147
)
167-
fromgit.remoteimportFetchInfo,PushInfo,Remote,RemoteProgress# @NoMove
148+
fromgit.diffimport (# @NoMove
149+
INDEX,
150+
NULL_TREE,
151+
Diff,
152+
DiffConstants,
153+
DiffIndex,
154+
Diffable,
155+
)
156+
fromgit.dbimportGitCmdObjectDB,GitDB# @NoMove
157+
fromgit.cmdimportGit# @NoMove
168158
fromgit.repoimportRepo# @NoMove
159+
fromgit.remoteimportFetchInfo,PushInfo,Remote,RemoteProgress# @NoMove
160+
fromgit.indeximport (# @NoMove
161+
BaseIndexEntry,
162+
BlobFilter,
163+
CheckoutError,
164+
IndexEntry,
165+
IndexFile,
166+
StageType,
167+
util,# noqa: F401 # For backward compatibility.
168+
)
169169
fromgit.utilimport (# @NoMove
170170
Actor,
171171
BlockingLockFile,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp