diff options
| author | Yobmod <yobmod@gmail.com> | 2021-07-09 15:40:14 +0100 |
|---|---|---|
| committer | Yobmod <yobmod@gmail.com> | 2021-07-09 15:40:14 +0100 |
| commit | f916c148ea956655837a98817778abe685bf7ee7 (patch) | |
| tree | 71797d1ebabf4c54529c5d7b4fbc590775723bc9 /git/index | |
| parent | 7c6ae2b94cfd1593c12366b6abc0cd5bbb6e07b2 (diff) | |
| download | gitpython-f916c148ea956655837a98817778abe685bf7ee7.tar.gz | |
Improve Diffable method typing
Diffstat (limited to 'git/index')
| -rw-r--r-- | git/index/base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git/index/base.py b/git/index/base.py index bd3dde99..6738e223 100644 --- a/git/index/base.py +++ b/git/index/base.py @@ -68,7 +68,7 @@ from .util import ( # typing ----------------------------------------------------------------------------- from typing import (Any, BinaryIO, Callable, Dict, IO, Iterable, Iterator, List, NoReturn, - Sequence, TYPE_CHECKING, Tuple, Union) + Sequence, TYPE_CHECKING, Tuple, Type, Union) from git.types import Commit_ish, PathLike, TBD @@ -575,8 +575,8 @@ 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[str, git_diff.Diffable, object]] - ) -> List[Union[str, git_diff.Diffable, object]]: + 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']]]: try: args.pop(args.index(self)) except IndexError: |
