|
1 | 1 | """Module with functions which are supposed to be as fast as possible""" |
2 | 2 | from stat import S_ISDIR |
3 | 3 |
|
4 | | -from git import GitCmdObjectDB |
5 | 4 |
|
6 | 5 | from git.compat import ( |
7 | 6 | safe_decode, |
|
14 | 13 |
|
15 | 14 | if TYPE_CHECKING: |
16 | 15 | from _typeshed import ReadableBuffer |
| 16 | + from git import GitCmdObjectDB |
17 | 17 |
|
18 | 18 | EntryTup = Tuple[bytes, int, str] # same as TreeCacheTup in tree.py |
19 | 19 |
|
@@ -143,7 +143,7 @@ def _to_full_path(item: Union[EntryTup, None], path_prefix: str) -> Union[EntryT |
143 | 143 | return (item[0], item[1], path_prefix + item[2]) |
144 | 144 |
|
145 | 145 |
|
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]], |
147 | 147 | path_prefix: str) -> List[Union[EntryTup, None]]: |
148 | 148 | """ |
149 | 149 | :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 |
216 | 216 | return out |
217 | 217 |
|
218 | 218 |
|
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]]: |
220 | 220 | """ |
221 | 221 | :return: list of entries of the tree pointed to by the binary tree_sha. An entry |
222 | 222 | has the following format: |
|
0 commit comments