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

Commit4badc19

Browse files
committed
Fix git.index imports
- Add the base, fun, typ, and util Python submodules of git.index to git.index.__all__ to restore the old behavior.- Import them explicitly for clarity, even though they are bound to the same-named attributes of git.index either way. This should help human readers know what the entries in __all__ are referring to, and may also help some automated tools. This is a preliminary decision and not necessarily the one that will ultimately be taken in this import refactoring. It *may* cause some kinds of mistakes, such as those arising from ill-advised use of wildcard imports in production code *outside* GitPython, somewhat worse in their effects.- Remove the ab.diff file that showed the problem this solves.This resolves the problem deliberately introduced in the previousincomplete commit, which modattrs.py output and test_imports testresults confirm.
1 parentfc86a23 commit4badc19

File tree

2 files changed

+5
-30
lines changed

2 files changed

+5
-30
lines changed

‎ab.diff‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎git/index/__init__.py‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
"""Initialize the index package."""
55

66
__all__= [
7+
"base",
8+
"fun",
9+
"typ",
10+
"util",
711
"BaseIndexEntry",
812
"BlobFilter",
913
"CheckoutError",
@@ -12,5 +16,6 @@
1216
"StageType",
1317
]
1418

19+
from .importbase,fun,typ,util
1520
from .baseimportCheckoutError,IndexFile
1621
from .typimportBaseIndexEntry,BlobFilter,IndexEntry,StageType

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp