summaryrefslogtreecommitdiff
path: root/git/compat.py
diff options
context:
space:
mode:
authorYobmod <yobmod@gmail.com>2021-07-31 22:26:20 +0100
committerYobmod <yobmod@gmail.com>2021-07-31 22:26:20 +0100
commit39d37d550963a6a64e66ba3d6b9f4b077270a3ad (patch)
tree0f5f7d75ffc4ac1d6abc689d6739d7077adf7d27 /git/compat.py
parent2a350b57ce79a0e1b71623d1146c52918232e074 (diff)
downloadgitpython-39d37d550963a6a64e66ba3d6b9f4b077270a3ad.tar.gz
replace some TBDs wiht runtime types
Diffstat (limited to 'git/compat.py')
-rw-r--r--git/compat.py18
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