Skip to content

Commit

Permalink
Changes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Nov 11, 2021
1 parent 17cd115 commit de58c57
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions typing_extensions/src_py3/typing_extensions.py
@@ -1,6 +1,7 @@
import abc
import collections
import collections.abc
import operator
import sys
import typing

Expand Down Expand Up @@ -67,11 +68,15 @@ def _check_generic(cls, parameters):
'SupportsIndex',

# One-off things.
'Annotated',
'final',
'IntVar',
'Literal',
'NewType',
'overload',
'Protocol',
'runtime',
'runtime_checkable',
'Text',
'TypeAlias',
'TypeGuard',
Expand All @@ -81,8 +86,6 @@ def _check_generic(cls, parameters):
if PEP_560:
__all__.extend(["get_args", "get_origin", "get_type_hints"])

__all__.extend(['Annotated', 'Protocol', 'runtime', 'runtime_checkable'])

# 3.6.2+
if hasattr(typing, 'NoReturn'):
NoReturn = typing.NoReturn
Expand Down Expand Up @@ -1043,9 +1046,6 @@ def _typeddict_new(*args, total=True, **kwargs):

class _TypedDictMeta(type):
def __init__(cls, name, bases, ns, total=True):
# In Python 3.4 and 3.5 the __init__ method also needs to support the
# keyword arguments.
# See https://www.python.org/dev/peps/pep-0487/#implementation-details
super().__init__(name, bases, ns)

def __new__(cls, name, bases, ns, total=True):
Expand Down Expand Up @@ -1130,8 +1130,6 @@ class Point2D(TypedDict):
_AnnotatedAlias = typing._AnnotatedAlias
# 3.7-3.8
elif PEP_560:
import operator

class _AnnotatedAlias(typing._GenericAlias, _root=True):
"""Runtime representation of an annotated type.
Expand Down

0 comments on commit de58c57

Please sign in to comment.