diff options
author | Yobmod <yobmod@gmail.com> | 2021-05-16 18:04:30 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-05-16 18:04:30 +0100 |
commit | 78d12aa7c922551dddd7168498e29eae32c9d109 (patch) | |
tree | ee45d8792ee808a4316cfac5133397a7becf8334 /git/diff.py | |
parent | c3f91bd1c0e8aef1b416ae6b1f55e7bd93a4f281 (diff) | |
download | gitpython-78d12aa7c922551dddd7168498e29eae32c9d109.tar.gz |
Add remaining types to IndexFile ._preprocess_add_items() to .diff()
Diffstat (limited to 'git/diff.py')
-rw-r--r-- | git/diff.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/git/diff.py b/git/diff.py index ca673b0c..a40fc244 100644 --- a/git/diff.py +++ b/git/diff.py @@ -16,7 +16,7 @@ from .objects.util import mode_str_to_int # typing ------------------------------------------------------------------ from typing import Any, Iterator, List, Match, Optional, Tuple, Type, Union, TYPE_CHECKING -from git.types import TBD, Final, Literal +from git.types import PathLike, TBD, Final, Literal if TYPE_CHECKING: from .objects.tree import Tree @@ -84,7 +84,7 @@ class Diffable(object): return args def diff(self, other: Union[Type[Index], Type['Tree'], object, None, str] = Index, - paths: Union[str, List[str], Tuple[str, ...], None] = None, + paths: Union[PathLike, List[PathLike], Tuple[PathLike, ...], None] = None, create_patch: bool = False, **kwargs: Any) -> 'DiffIndex': """Creates diffs between two items being trees, trees and index or an index and the working tree. It will detect renames automatically. |