summaryrefslogtreecommitdiff
path: root/git/index/base.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-09 22:58:02 +0100
committerYobmod <yobmod@gmail.com>2021-07-09 22:58:02 +0100
commit09053c565915d114384b1c20af8eecfed98c8069 (patch)
tree9ca044829e8d8a17242a14c37a5af0f963c0bb96 /git/index/base.py
parent797e962fc1811ddc5a5a34308bd243953eb77135 (diff)
downloadgitpython-09053c565915d114384b1c20af8eecfed98c8069.tar.gz
Improve IndexFile_process_diff_args() to get checks to rerun
Diffstat (limited to 'git/index/base.py')
-rw-r--r--git/index/base.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/git/index/base.py b/git/index/base.py
index 75df5184..6f6ea5aa 100644
--- a/git/index/base.py
+++ b/git/index/base.py
@@ -575,8 +575,9 @@ class IndexFile(LazyMixin, git_diff.Diffable, Serializable):
root_tree._cache = tree_items # type: ignore
return root_tree
- def _process_diff_args(self, args: List[Union[PathLike, 'git_diff.Diffable', Type['git_diff.Diffable.Index']]]
- ) -> List[Union[PathLike, 'git_diff.Diffable', Type['git_diff.Diffable.Index']]]:
+ def _process_diff_args(self, # type: ignore[override]
+ args: List[Union[str, 'git_diff.Diffable', Type['git_diff.Diffable.Index']]]
+ ) -> List[Union[str, 'git_diff.Diffable', Type['git_diff.Diffable.Index']]]:
try:
args.pop(args.index(self))
except IndexError:
@@ -1272,9 +1273,8 @@ class IndexFile(LazyMixin, git_diff.Diffable, Serializable):
return self
# @ default_index, breaks typing for some reason, copied into function
- def diff(self,
- other: Union[Type['git_diff.Diffable.Index'], 'IndexFile.Index',
- 'Tree', 'Commit', str, None] = git_diff.Diffable.Index,
+ def diff(self, # type: ignore[override]
+ other: Union[Type['git_diff.Diffable.Index'], 'Tree', 'Commit', str, None] = git_diff.Diffable.Index,
paths: Union[PathLike, List[PathLike], Tuple[PathLike, ...], None] = None,
create_patch: bool = False, **kwargs: Any
) -> git_diff.DiffIndex: