@@ -187,7 +187,7 @@ def diff(
187
187
paths : Union [PathLike , List [PathLike ], Tuple [PathLike , ...], None ] = None ,
188
188
create_patch : bool = False ,
189
189
** kwargs : Any ,
190
- ) -> "DiffIndex" :
190
+ ) -> "DiffIndex[Diff] " :
191
191
"""Create diffs between two items being trees, trees and index or an index and
192
192
the working tree. Detects renames automatically.
193
193
@@ -581,7 +581,7 @@ def _pick_best_path(cls, path_match: bytes, rename_match: bytes, path_fallback_m
581
581
return None
582
582
583
583
@classmethod
584
- def _index_from_patch_format (cls , repo : "Repo" , proc : Union ["Popen" , "Git.AutoInterrupt" ]) -> DiffIndex :
584
+ def _index_from_patch_format (cls , repo : "Repo" , proc : Union ["Popen" , "Git.AutoInterrupt" ]) -> DiffIndex [ "Diff" ] :
585
585
"""Create a new :class:`DiffIndex` from the given process output which must be
586
586
in patch format.
587
587
@@ -674,7 +674,7 @@ def _index_from_patch_format(cls, repo: "Repo", proc: Union["Popen", "Git.AutoIn
674
674
return index
675
675
676
676
@staticmethod
677
- def _handle_diff_line (lines_bytes : bytes , repo : "Repo" , index : DiffIndex ) -> None :
677
+ def _handle_diff_line (lines_bytes : bytes , repo : "Repo" , index : DiffIndex [ "Diff" ] ) -> None :
678
678
lines = lines_bytes .decode (defenc )
679
679
680
680
# Discard everything before the first colon, and the colon itself.
@@ -747,7 +747,7 @@ def _handle_diff_line(lines_bytes: bytes, repo: "Repo", index: DiffIndex) -> Non
747
747
index .append (diff )
748
748
749
749
@classmethod
750
- def _index_from_raw_format (cls , repo : "Repo" , proc : "Popen" ) -> "DiffIndex" :
750
+ def _index_from_raw_format (cls , repo : "Repo" , proc : "Popen" ) -> "DiffIndex[Diff] " :
751
751
"""Create a new :class:`DiffIndex` from the given process output which must be
752
752
in raw format.
753
753
0 commit comments