From 797e962fc1811ddc5a5a34308bd243953eb77135 Mon Sep 17 00:00:00 2001 From: Yobmod Date: Fri, 9 Jul 2021 16:27:34 +0100 Subject: Make IndexFile and Diffable .diff() types agree --- git/index/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'git/index') diff --git a/git/index/base.py b/git/index/base.py index 149edf5a..75df5184 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -1273,7 +1273,8 @@ class IndexFile(LazyMixin, git_diff.Diffable, Serializable): # @ default_index, breaks typing for some reason, copied into function def diff(self, - other: Union[git_diff.Diffable.Index, 'IndexFile.Index', Treeish, None, object] = git_diff.Diffable.Index, + other: Union[Type['git_diff.Diffable.Index'], 'IndexFile.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: -- cgit v1.2.1