diff options
| author | Yobmod <yobmod@gmail.com> | 2021-06-24 05:52:48 +0100 |
|---|---|---|
| committer | Yobmod <yobmod@gmail.com> | 2021-06-24 05:52:48 +0100 |
| commit | 42e4f5e26b812385df65f8f32081035e2fb2a121 (patch) | |
| tree | b391428ad23747b8cb8ee34908f0a4e4711c45a5 /git/index | |
| parent | 6500844a925f0df90a0926dbdfc7b5ebb4a97bc9 (diff) | |
| download | gitpython-42e4f5e26b812385df65f8f32081035e2fb2a121.tar.gz | |
Add types to tree.Tree
Diffstat (limited to 'git/index')
| -rw-r--r-- | git/index/base.py | 2 | ||||
| -rw-r--r-- | git/index/fun.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/git/index/base.py b/git/index/base.py index 04424060..e2b3f8fa 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -568,7 +568,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable): # note: additional deserialization could be saved if write_tree_from_cache # would return sorted tree entries root_tree = Tree(self.repo, binsha, path='') - root_tree._cache = tree_items + root_tree._cache = tree_items # type: ignore return root_tree def _process_diff_args(self, args: List[Union[str, diff.Diffable, object]] diff --git a/git/index/fun.py b/git/index/fun.py index 3fded347..10a44050 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -293,7 +293,7 @@ def write_tree_from_cache(entries: List[IndexEntry], odb, sl: slice, si: int = 0 # finally create the tree sio = BytesIO() tree_to_stream(tree_items, sio.write) # converts bytes of each item[0] to str - tree_items_stringified = cast(List[Tuple[str, int, str]], tree_items) # type: List[Tuple[str, int, str]] + tree_items_stringified = cast(List[Tuple[str, int, str]], tree_items) sio.seek(0) istream = odb.store(IStream(str_tree_type, len(sio.getvalue()), sio)) |
