| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -20,6 +20,7 @@ | |||
| 20 | 20 | ||
| 21 | 21 | if TYPE_CHECKING: | |
| 22 | 22 | from .objects.tree import Tree | |
| 23 | + from .objects import Commit | ||
| 23 | 24 | from git.repo.base import Repo | |
| 24 | 25 | from git.objects.base import IndexObject | |
| 25 | 26 | from subprocess import Popen | |
@@ -90,7 +91,7 @@ def _process_diff_args(self, args: List[Union[PathLike, 'Diffable', Type['Diffab | |||
| 90 | 91 | Subclasses can use it to alter the behaviour of the superclass""" | |
| 91 | 92 | return args | |
| 92 | 93 | ||
| 93 | - def diff(self, other: Union[Type['Index'], 'Tree', None, str] = Index, | ||
| 94 | + def diff(self, other: Union[Type['Index'], 'Tree', 'Commit', None, str] = Index, # object for git.NULL_TREE | ||
| 94 | 95 | paths: Union[PathLike, List[PathLike], Tuple[PathLike, ...], None] = None, | |
| 95 | 96 | create_patch: bool = False, **kwargs: Any) -> 'DiffIndex': | |
| 96 | 97 | """Creates diffs between two items being trees, trees and index or an | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1273,7 +1273,8 @@ def reset(self, commit: Union[Commit, 'Reference', str] = 'HEAD', working_tree: | |||
| 1273 | 1273 | ||
| 1274 | 1274 | # @ default_index, breaks typing for some reason, copied into function | |
| 1275 | 1275 | def diff(self, | |
| 1276 | - other: Union[git_diff.Diffable.Index, 'IndexFile.Index', Treeish, None, object] = git_diff.Diffable.Index, | ||
| 1276 | + other: Union[Type['git_diff.Diffable.Index'], 'IndexFile.Index', | ||
| 1277 | + 'Tree', 'Commit', str, None] = git_diff.Diffable.Index, | ||
| 1277 | 1278 | paths: Union[PathLike, List[PathLike], Tuple[PathLike, ...], None] = None, | |
| 1278 | 1279 | create_patch: bool = False, **kwargs: Any | |
| 1279 | 1280 | ) -> git_diff.DiffIndex: | |
| Back | FazBrowse Home | New Git URL |
0 commit comments