From 78d12aa7c922551dddd7168498e29eae32c9d109 Mon Sep 17 00:00:00 2001 From: Yobmod Date: Sun, 16 May 2021 18:04:30 +0100 Subject: Add remaining types to IndexFile ._preprocess_add_items() to .diff() --- git/diff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git/diff.py') 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. -- cgit v1.2.1