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

Commit1533596

Browse files
committed
Mak EntryTup a froward ref
1 parent9f88796 commit1533596

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

‎git/index/fun.py‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,11 @@
5757

5858
ifTYPE_CHECKING:
5959
from .baseimportIndexFile
60-
fromgit.objects.funimportEntryTup
60+
fromgit.objects.funimportEntryTupOrNone
61+
62+
63+
defis_three_entry_list(inp)->TypeGuard[List['EntryTupOrNone']]:
64+
returnisinstance(inp,list)andlen(inp)==3
6165

6266
# ------------------------------------------------------------------------------------
6367

@@ -334,11 +338,6 @@ def aggressive_tree_merge(odb, tree_shas: Sequence[bytes]) -> List[BaseIndexEntr
334338
iflen(tree_shas)>3:
335339
raiseValueError("Cannot handle %i trees at once"%len(tree_shas))
336340

337-
EntryTupOrNone=Union[EntryTup,None]
338-
339-
defis_three_entry_list(inp)->TypeGuard[List[EntryTupOrNone]]:
340-
returnisinstance(inp,list)andlen(inp)==3
341-
342341
# three trees
343342
forthree_entriesintraverse_trees_recursive(odb,tree_shas,''):
344343

‎git/objects/fun.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
fromgitimportGitCmdObjectDB
1717

1818
EntryTup=Tuple[bytes,int,str]# same as TreeCacheTup in tree.py
19-
19+
EntryTupOrNone=Union[EntryTup,None]
2020

2121
# ---------------------------------------------------
2222

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2026 Movatter.jp