summaryrefslogtreecommitdiff
path: root/git/remote.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/remote.py')
-rw-r--r--git/remote.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/git/remote.py b/git/remote.py
index 11007cb6..3888506f 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', '?']
@@ -633,7 +632,7 @@ class Remote(LazyMixin, IterableObj):
as well. This is a fix for the issue described here:
https://github.com/gitpython-developers/GitPython/issues/260
"""
- out_refs: IterableList[RemoteReference] = IterableList(RemoteReference._id_attribute_, "%s/" % self.name)
+ out_refs: IterableList[Reference] = IterableList(RemoteReference._id_attribute_, "%s/" % self.name)
for line in self.repo.git.remote("prune", "--dry-run", self).splitlines()[2:]:
# expecting
# * [would prune] origin/new_branch
@@ -643,7 +642,7 @@ class Remote(LazyMixin, IterableObj):
ref_name = line.replace(token, "")
# sometimes, paths start with a full ref name, like refs/tags/foo, see #260
if ref_name.startswith(Reference._common_path_default + '/'):
- out_refs.append(SymbolicReference.from_path(self.repo, ref_name))
+ out_refs.append(Reference.from_path(self.repo, ref_name))
else:
fqhn = "%s/%s" % (RemoteReference._common_path_default, ref_name)
out_refs.append(RemoteReference(self.repo, fqhn))
@@ -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)