Skip to content

Commit 9f88796

Browse files
committed
Mak GitCmdObjectDB a froward ref
1 parent 5d3818e commit 9f88796

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

git/objects/fun.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Module with functions which are supposed to be as fast as possible"""
22
from stat import S_ISDIR
33

4-
from git import GitCmdObjectDB
54

65
from git.compat import (
76
safe_decode,
@@ -14,6 +13,7 @@
1413

1514
if TYPE_CHECKING:
1615
from _typeshed import ReadableBuffer
16+
from git import GitCmdObjectDB
1717

1818
EntryTup = Tuple[bytes, int, str] # same as TreeCacheTup in tree.py
1919

@@ -143,7 +143,7 @@ def _to_full_path(item: Union[EntryTup, None], path_prefix: str) -> Union[EntryT
143143
return (item[0], item[1], path_prefix + item[2])
144144

145145

146-
def traverse_trees_recursive(odb: GitCmdObjectDB, tree_shas: Sequence[Union[bytes, None]],
146+
def traverse_trees_recursive(odb: 'GitCmdObjectDB', tree_shas: Sequence[Union[bytes, None]],
147147
path_prefix: str) -> List[Union[EntryTup, None]]:
148148
"""
149149
:return: list with entries according to the given binary tree-shas.
@@ -216,7 +216,7 @@ def traverse_trees_recursive(odb: GitCmdObjectDB, tree_shas: Sequence[Union[byte
216216
return out
217217

218218

219-
def traverse_tree_recursive(odb: GitCmdObjectDB, tree_sha: bytes, path_prefix: str) -> List[Tuple[bytes, int, str]]:
219+
def traverse_tree_recursive(odb: 'GitCmdObjectDB', tree_sha: bytes, path_prefix: str) -> List[Tuple[bytes, int, str]]:
220220
"""
221221
:return: list of entries of the tree pointed to by the binary tree_sha. An entry
222222
has the following format:

0 commit comments

Comments
 (0)