diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2021-05-18 08:29:52 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-18 08:29:52 +0800 |
commit | b11bcfa3df4d0b792823930bffae126fd12673f7 (patch) | |
tree | 85dc837ef6cadec84d232f5e7110d2dfc44c3b1a /git/diff.py | |
parent | 33346b25c3a4fb5ea37202d88d6a6c66379099c5 (diff) | |
parent | c30bf3ba7548a0e996907b9a097ec322760eb43a (diff) | |
download | gitpython-b11bcfa3df4d0b792823930bffae126fd12673f7.tar.gz |
Merge pull request #1244 from Yobmod/main
Added types to Index submodule
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. |