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

Commit94c6652

Browse files
committed
Make TreeCacheTup forward ref
1 parente6a27ad commit94c6652

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎git/index/fun.py‎

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

5858
ifTYPE_CHECKING:
5959
from .baseimportIndexFile
60-
fromobjects.treeimportTreeCacheTup
60+
fromgit.objects.treeimportTreeCacheTup
6161
# from git.objects.fun import EntryTupOrNone
6262

6363
# ------------------------------------------------------------------------------------
@@ -250,7 +250,7 @@ def read_cache(stream: IO[bytes]) -> Tuple[int, Dict[Tuple[PathLike, int], 'Inde
250250

251251

252252
defwrite_tree_from_cache(entries:List[IndexEntry],odb,sl:slice,si:int=0
253-
)->Tuple[bytes,List[TreeCacheTup]]:
253+
)->Tuple[bytes,List['TreeCacheTup']]:
254254
"""Create a tree from the given sorted list of entries and put the respective
255255
trees into the given object database
256256
@@ -260,7 +260,7 @@ def write_tree_from_cache(entries: List[IndexEntry], odb, sl: slice, si: int = 0
260260
:param sl: slice indicating the range we should process on the entries list
261261
:return: tuple(binsha, list(tree_entry, ...)) a tuple of a sha and a list of
262262
tree entries being a tuple of hexsha, mode, name"""
263-
tree_items:List[TreeCacheTup]= []
263+
tree_items:List['TreeCacheTup']= []
264264

265265
ci=sl.start
266266
end=sl.stop
@@ -306,7 +306,7 @@ def write_tree_from_cache(entries: List[IndexEntry], odb, sl: slice, si: int = 0
306306
return (istream.binsha,tree_items)
307307

308308

309-
def_tree_entry_to_baseindexentry(tree_entry:TreeCacheTup,stage:int)->BaseIndexEntry:
309+
def_tree_entry_to_baseindexentry(tree_entry:'TreeCacheTup',stage:int)->BaseIndexEntry:
310310
returnBaseIndexEntry((tree_entry[1],tree_entry[0],stage<<CE_STAGESHIFT,tree_entry[2]))
311311

312312

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp