diff options
author | Yobmod <yobmod@gmail.com> | 2021-07-09 00:56:20 +0100 |
---|---|---|
committer | Yobmod <yobmod@gmail.com> | 2021-07-09 00:56:20 +0100 |
commit | 1faa25fcf828062d2c4ad35a962b4d8d3b05e855 (patch) | |
tree | de2a427894b78dfd2ca7f9f3de6ae86335b5004e /git/util.py | |
parent | 4802a36bd0fec7e6ae03d6713ceae70de8e1783a (diff) | |
download | gitpython-1faa25fcf828062d2c4ad35a962b4d8d3b05e855.tar.gz |
Rmv typeguard from list_traverse(), was wrong
Diffstat (limited to 'git/util.py')
-rw-r--r-- | git/util.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/git/util.py b/git/util.py index b13af358..63ac6134 100644 --- a/git/util.py +++ b/git/util.py @@ -36,11 +36,13 @@ if TYPE_CHECKING: from git.remote import Remote from git.repo.base import Repo from git.config import GitConfigParser, SectionConstraint + from git.objects.base import IndexObject -from .types import (Literal, Protocol, SupportsIndex, # because behind py version guards + +from .types import (Literal, SupportsIndex, # because behind py version guards PathLike, HSH_TD, Total_TD, Files_TD) # aliases -T_IterableObj = TypeVar('T_IterableObj', bound='IterableObj', covariant=True) +T_IterableObj = TypeVar('T_IterableObj', bound=Union['IterableObj', 'IndexObject'], covariant=True) # So IterableList[Head] is subtype of IterableList[IterableObj] # --------------------------------------------------------------------- @@ -1068,7 +1070,7 @@ class Iterable(object): raise NotImplementedError("To be implemented by Subclass") -class IterableObj(Protocol): +class IterableObj(): """Defines an interface for iterable items which is to assure a uniform way to retrieve and iterate items within the git repository |