|
70 | 70 | from typing import (Any, BinaryIO, Callable, Dict, IO, Iterable, Iterator, List, NoReturn, |
71 | 71 | Sequence, TYPE_CHECKING, Tuple, Type, Union) |
72 | 72 |
|
73 | | -from git.types import Commit_ish, PathLike, TBD |
| 73 | +from git.types import Commit_ish, PathLike |
74 | 74 |
|
75 | 75 | if TYPE_CHECKING: |
76 | 76 | from subprocess import Popen |
@@ -181,7 +181,7 @@ def _deserialize(self, stream: IO) -> 'IndexFile': |
181 | 181 | self.version, self.entries, self._extension_data, _conten_sha = read_cache(stream) |
182 | 182 | return self |
183 | 183 |
|
184 | | - def _entries_sorted(self) -> List[TBD]: |
| 184 | + def _entries_sorted(self) -> List[IndexEntry]: |
185 | 185 | """:return: list of entries, in a sorted fashion, first by path, then by stage""" |
186 | 186 | return sorted(self.entries.values(), key=lambda e: (e.path, e.stage)) |
187 | 187 |
|
@@ -427,8 +427,8 @@ def raise_exc(e: Exception) -> NoReturn: |
427 | 427 | # END path exception handling |
428 | 428 | # END for each path |
429 | 429 |
|
430 | | - def _write_path_to_stdin(self, proc: 'Popen', filepath: PathLike, item: TBD, fmakeexc: Callable[..., GitError], |
431 | | - fprogress: Callable[[PathLike, bool, TBD], None], |
| 430 | + def _write_path_to_stdin(self, proc: 'Popen', filepath: PathLike, item: PathLike, fmakeexc: Callable[..., GitError], |
| 431 | + fprogress: Callable[[PathLike, bool, PathLike], None], |
432 | 432 | read_from_stdout: bool = True) -> Union[None, str]: |
433 | 433 | """Write path to proc.stdin and make sure it processes the item, including progress. |
434 | 434 |
|
@@ -492,12 +492,13 @@ def unmerged_blobs(self) -> Dict[PathLike, List[Tuple[StageType, Blob]]]: |
492 | 492 | are at stage 3 will not have a stage 3 entry. |
493 | 493 | """ |
494 | 494 | is_unmerged_blob = lambda t: t[0] != 0 |
495 | | - path_map: Dict[PathLike, List[Tuple[TBD, Blob]]] = {} |
| 495 | + path_map: Dict[PathLike, List[Tuple[StageType, Blob]]] = {} |
496 | 496 | for stage, blob in self.iter_blobs(is_unmerged_blob): |
497 | 497 | path_map.setdefault(blob.path, []).append((stage, blob)) |
498 | 498 | # END for each unmerged blob |
499 | 499 | for line in path_map.values(): |
500 | 500 | line.sort() |
| 501 | + |
501 | 502 | return path_map |
502 | 503 |
|
503 | 504 | @ classmethod |
|
0 commit comments