Skip to content

Commit

Permalink
And another missing import
Browse files Browse the repository at this point in the history
  • Loading branch information
ilevkivskyi committed Aug 19, 2017
1 parent d8ae30e commit a4e68ff
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions typing_extensions/src_py3/typing_extensions.py
Expand Up @@ -10,7 +10,7 @@
# code duplication. (Also this is only until Protocol is in typing.)
from typing import (
GenericMeta, TypingMeta, Generic, Callable, TypeVar, Tuple,
_type_vars, _next_in_mro, _type_check, _TypingEllipsis, _TypingEmpty,
_type_vars, _next_in_mro, _type_check,
_make_subclasshook, _check_generic
)
try:
Expand All @@ -26,6 +26,11 @@ def _no_slots_copy(dct):
from typing import _tp_cache
except ImportError:
_tp_cache = lambda x: x
try:
from typing import _TypingEllipsis, _TypingEmpty
except ImportError:
class _TypingEllipsis: pass
class _TypingEmpty: pass

if hasattr(typing, '_generic_new'):
_generic_new = typing._generic_new
Expand Down Expand Up @@ -721,7 +726,8 @@ def __new__(cls, name, bases, namespace,
'__subclasshook__' not in namespace and extra or
getattr(self.__subclasshook__, '__name__', '') == '__extrahook__'
):
self.__subclasshook__ = _make_subclasshook(self)
if _make_subclasshook:
self.__subclasshook__ = _make_subclasshook(self)
if isinstance(extra, abc.ABCMeta):
self._abc_registry = extra._abc_registry
self._abc_cache = extra._abc_cache
Expand Down

0 comments on commit a4e68ff

Please sign in to comment.