diff options
| author | Yobmod <yobmod@gmail.com> | 2021-07-31 22:59:11 +0100 |
|---|---|---|
| committer | Yobmod <yobmod@gmail.com> | 2021-07-31 22:59:11 +0100 |
| commit | c878771e3a31c983a0c3468396ed33a532f87e98 (patch) | |
| tree | ed7d6b93e0f72e25e52009d99a42cdfc6bcbb632 /git/remote.py | |
| parent | 39d37d550963a6a64e66ba3d6b9f4b077270a3ad (diff) | |
| download | gitpython-c878771e3a31c983a0c3468396ed33a532f87e98.tar.gz | |
replace more TBDs wiht runtime types
Diffstat (limited to 'git/remote.py')
| -rw-r--r-- | git/remote.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/git/remote.py b/git/remote.py index 11007cb6..c141519a 100644 --- a/git/remote.py +++ b/git/remote.py @@ -37,10 +37,10 @@ from .refs import ( # typing------------------------------------------------------- -from typing import (Any, Callable, Dict, Iterator, List, NoReturn, Optional, Sequence, # NOQA[TC002] +from typing import (Any, Callable, Dict, Iterator, List, NoReturn, Optional, Sequence, TYPE_CHECKING, Type, Union, cast, overload) -from git.types import PathLike, Literal, TBD, Commit_ish # NOQA[TC002] +from git.types import PathLike, Literal, Commit_ish if TYPE_CHECKING: from git.repo.base import Repo @@ -50,7 +50,6 @@ if TYPE_CHECKING: flagKeyLiteral = Literal[' ', '!', '+', '-', '*', '=', 't', '?'] - # def is_flagKeyLiteral(inp: str) -> TypeGuard[flagKeyLiteral]: # return inp in [' ', '!', '+', '-', '=', '*', 't', '?'] @@ -707,9 +706,10 @@ class Remote(LazyMixin, IterableObj): self.repo.git.remote(scmd, self.name, **kwargs) return self - def _get_fetch_info_from_stderr(self, proc: TBD, + def _get_fetch_info_from_stderr(self, proc: 'Git.AutoInterrupt', progress: Union[Callable[..., Any], RemoteProgress, None] ) -> IterableList['FetchInfo']: + progress = to_progress_instance(progress) # skip first line as it is some remote info we are not interested in @@ -768,7 +768,7 @@ class Remote(LazyMixin, IterableObj): log.warning("Git informed while fetching: %s", err_line.strip()) return output - def _get_push_info(self, proc: TBD, + def _get_push_info(self, proc: 'Git.AutoInterrupt', progress: Union[Callable[..., Any], RemoteProgress, None]) -> IterableList[PushInfo]: progress = to_progress_instance(progress) |
