diff options
author | Yobmod <yobmod@gmail.com> | 2021-07-08 23:25:18 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-07-08 23:25:18 +0100 |
commit | c27d2b078b515a8321b3f7f7abdcea363d8049df (patch) | |
tree | e9178d0d2abe27e2b4fa4b5ab1fe27f5c4860562 /git/objects/fun.py | |
parent | dfbc0f42c7555b7145768774b861029c4283178c (diff) | |
download | gitpython-c27d2b078b515a8321b3f7f7abdcea363d8049df.tar.gz |
Use Tuple not tuple
Diffstat (limited to 'git/objects/fun.py')
-rw-r--r-- | git/objects/fun.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git/objects/fun.py b/git/objects/fun.py index cb323afb..42954fc2 100644 --- a/git/objects/fun.py +++ b/git/objects/fun.py @@ -144,7 +144,7 @@ def _to_full_path(item: EntryTupOrNone, path_prefix: str) -> EntryTupOrNone: def traverse_trees_recursive(odb: 'GitCmdObjectDB', tree_shas: Sequence[Union[bytes, None]], - path_prefix: str) -> List[tuple[EntryTupOrNone, ...]]: + path_prefix: str) -> List[Tuple[EntryTupOrNone, ...]]: """ :return: list of list with entries according to the given binary tree-shas. The result is encoded in a list @@ -165,7 +165,8 @@ def traverse_trees_recursive(odb: 'GitCmdObjectDB', tree_shas: Sequence[Union[by if tree_sha is None: data: List[EntryTupOrNone] = [] else: - data = list(tree_entries_from_data(odb.stream(tree_sha).read())) # make new list for typing as invariant + # make new list for typing as list invariant + data = [x for x in tree_entries_from_data(odb.stream(tree_sha).read())] # END handle muted trees trees_data.append(data) # END for each sha to get data for |