summaryrefslogtreecommitdiff
path: root/git/index/base.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-06 14:25:23 +0100
committerYobmod <yobmod@gmail.com>2021-07-06 14:25:23 +0100
commit647101833ae276f3b923583e202faa3f7d78e218 (patch)
tree298db9f851fe2f4adc4e48554ca2a79f6faf2da8 /git/index/base.py
parent3ce319f1296a5402079e9280500e96cc1d12fd04 (diff)
downloadgitpython-647101833ae276f3b923583e202faa3f7d78e218.tar.gz
Improve types of @unbare_repo and @git_working_dir decorators
Diffstat (limited to 'git/index/base.py')
-rw-r--r--git/index/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/git/index/base.py b/git/index/base.py
index f4ffba7b..8346d24a 100644
--- a/git/index/base.py
+++ b/git/index/base.py
@@ -410,7 +410,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
# whose name contains wildcard characters.
if abs_path not in resolved_paths:
for f in self._iter_expand_paths(glob.glob(abs_path)):
- yield f.replace(rs, '')
+ yield str(f).replace(rs, '')
continue
# END glob handling
try:
@@ -635,7 +635,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
@git_working_dir
def _entries_for_paths(self, paths: List[str], path_rewriter: Callable, fprogress: Callable,
entries: List[BaseIndexEntry]) -> List[BaseIndexEntry]:
- entries_added = [] # type: List[BaseIndexEntry]
+ entries_added: List[BaseIndexEntry] = []
if path_rewriter:
for path in paths:
if osp.isabs(path):
@@ -769,7 +769,7 @@ class IndexFile(LazyMixin, diff.Diffable, Serializable):
# automatically
# paths can be git-added, for everything else we use git-update-index
paths, entries = self._preprocess_add_items(items)
- entries_added = []
+ entries_added: List[BaseIndexEntry] = []
# This code needs a working tree, therefore we try not to run it unless required.
# That way, we are OK on a bare repository as well.
# If there are no paths, the rewriter has nothing to do either