Skip to content

Commit c27d2b0

Browse files
committed
Use Tuple not tuple
1 parent dfbc0f4 commit c27d2b0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎git/objects/fun.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def _to_full_path(item: EntryTupOrNone, path_prefix: str) -> EntryTupOrNone:
144144

145145

146146
def traverse_trees_recursive(odb: 'GitCmdObjectDB', tree_shas: Sequence[Union[bytes, None]],
147-
path_prefix: str) -> List[tuple[EntryTupOrNone, ...]]:
147+
path_prefix: str) -> List[Tuple[EntryTupOrNone, ...]]:
148148
"""
149149
:return: list of list with entries according to the given binary tree-shas.
150150
The result is encoded in a list
@@ -165,7 +165,8 @@ def traverse_trees_recursive(odb: 'GitCmdObjectDB', tree_shas: Sequence[Union[by
165165
if tree_sha is None:
166166
data: List[EntryTupOrNone] = []
167167
else:
168-
data = list(tree_entries_from_data(odb.stream(tree_sha).read())) # make new list for typing as invariant
168+
# make new list for typing as list invariant
169+
data = [x for x in tree_entries_from_data(odb.stream(tree_sha).read())]
169170
# END handle muted trees
170171
trees_data.append(data)
171172
# END for each sha to get data for

0 commit comments

Comments
 (0)