diff options
author | Dominic <yobmod@gmail.com> | 2021-08-03 16:40:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-03 16:40:48 +0100 |
commit | fe54118ec07a68d5dc6f6108510cffc55dfca643 (patch) | |
tree | 3025974ca54ef607ee3d4660da4dc242e184f8ea /git/compat.py | |
parent | d8a639865d02a6bb3f93a233d3caa928d18bc622 (diff) | |
parent | 84232f7c71e41e56636f203eb26763a03ab6e945 (diff) | |
download | gitpython-fe54118ec07a68d5dc6f6108510cffc55dfca643.tar.gz |
Merge pull request #1311 from Yobmod/main
Drop 3.6, increase type strictness
Diffstat (limited to 'git/compat.py')
-rw-r--r-- | git/compat.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/git/compat.py b/git/compat.py index 7a0a15d2..988c04ef 100644 --- a/git/compat.py +++ b/git/compat.py @@ -29,8 +29,6 @@ from typing import ( Union, overload, ) -from git.types import TBD - # --------------------------------------------------------------------------- @@ -97,19 +95,3 @@ def win_encode(s: Optional[AnyStr]) -> Optional[bytes]: elif s is not None: raise TypeError('Expected bytes or text, but got %r' % (s,)) return None - - -# type: ignore ## mypy cannot understand dynamic class creation -def with_metaclass(meta: Type[Any], *bases: Any) -> TBD: - """copied from https://github.com/Byron/bcore/blob/master/src/python/butility/future.py#L15""" - - class metaclass(meta): # type: ignore - __call__ = type.__call__ - __init__ = type.__init__ # type: ignore - - def __new__(cls, name: str, nbases: Optional[Tuple[int, ...]], d: Dict[str, Any]) -> TBD: - if nbases is None: - return type.__new__(cls, name, (), d) - return meta(name, bases, d) - - return metaclass(meta.__name__ + 'Helper', None, {}) # type: ignore |