diff options
author | Yobmod <yobmod@gmail.com> | 2021-07-31 22:26:20 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-07-31 22:26:20 +0100 |
commit | 39d37d550963a6a64e66ba3d6b9f4b077270a3ad (patch) | |
tree | 0f5f7d75ffc4ac1d6abc689d6739d7077adf7d27 /git/util.py | |
parent | 2a350b57ce79a0e1b71623d1146c52918232e074 (diff) | |
download | gitpython-39d37d550963a6a64e66ba3d6b9f4b077270a3ad.tar.gz |
replace some TBDs wiht runtime types
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git/util.py b/git/util.py index 92d95379..8056804a 100644 --- a/git/util.py +++ b/git/util.py @@ -38,6 +38,7 @@ if TYPE_CHECKING: from git.remote import Remote from git.repo.base import Repo from git.config import GitConfigParser, SectionConstraint + from git import Git # from git.objects.base import IndexObject @@ -379,7 +380,7 @@ def get_user_id() -> str: return "%s@%s" % (getpass.getuser(), platform.node()) -def finalize_process(proc: subprocess.Popen, **kwargs: Any) -> None: +def finalize_process(proc: Union[subprocess.Popen, 'Git.AutoInterrupt'], **kwargs: Any) -> None: """Wait for the process (clone, fetch, pull or push) and handle its errors accordingly""" # TODO: No close proc-streams?? proc.wait(**kwargs) @@ -1033,7 +1034,7 @@ class IterableList(List[T_IterableObj]): class IterableClassWatcher(type): """ Metaclass that watches """ - def __init__(cls, name: str, bases: List, clsdict: Dict) -> None: + def __init__(cls, name: str, bases: Tuple, clsdict: Dict) -> None: for base in bases: if type(base) == IterableClassWatcher: warnings.warn(f"GitPython Iterable subclassed by {name}. " |