summaryrefslogtreecommitdiff
path: root/git/index/base.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-05-17 13:11:57 +0100
committerYobmod <yobmod@gmail.com>2021-05-17 13:11:57 +0100
commit025fe17da390c410e5bae4d6db0832afbfa26442 (patch)
tree677816fde797686f6ae07923e9a8698231a6fe28 /git/index/base.py
parent595181da70978ed44983a6c0ca4cb6d982ba0e8b (diff)
downloadgitpython-025fe17da390c410e5bae4d6db0832afbfa26442.tar.gz
add types to index.fun.py
Diffstat (limited to 'git/index/base.py')
-rw-r--r--git/index/base.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/git/index/base.py b/git/index/base.py
index 2bb62f32..5c4947ca 100644
--- a/git/index/base.py
+++ b/git/index/base.py
@@ -285,7 +285,8 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
New IndexFile instance. Its path will be undefined.
If you intend to write such a merged Index, supply an alternate file_path
to its 'write' method."""
- base_entries = aggressive_tree_merge(repo.odb, [to_bin_sha(str(t)) for t in tree_sha])
+ tree_sha_bytes = [to_bin_sha(str(t)) for t in tree_sha] # List[bytes]
+ base_entries = aggressive_tree_merge(repo.odb, tree_sha_bytes)
inst = cls(repo)
# convert to entries dict
@@ -1023,7 +1024,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
@default_index
def checkout(self, paths: Union[None, Iterable[PathLike]] = None, force: bool = False,
fprogress: Callable = lambda *args: None, **kwargs: Any
- ) -> Union[None, Iterator[PathLike], List[PathLike]]:
+ ) -> Union[None, Iterator[PathLike], Sequence[PathLike]]:
"""Checkout the given paths or all files from the version known to the index into
the working tree.