Skip to content

Commit 43a1cb6

Browse files
committed
Simplify PR to only tests and tiny code clean-up
1 parent ddf5078 commit 43a1cb6

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

python2/typing.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,10 +1212,6 @@ def __copy__(self):
12121212
self.__extra__, self.__orig_bases__)
12131213

12141214

1215-
# Prevent checks for Generic to crash when defining Generic.
1216-
Generic = None
1217-
1218-
12191215
def _generic_new(base_cls, cls, *args, **kwds):
12201216
# Assure type is erased on instantiation,
12211217
# but attempt to store it in __orig_class__

src/typing.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,10 +1171,6 @@ def __new__(cls, *args, **kwds):
11711171
return _generic_new(cls.__next_in_mro__, cls, *args, **kwds)
11721172

11731173

1174-
# prevent class and instance checks against plain Generic
1175-
Generic.__subclasshook__ = _make_subclasshook(Generic)
1176-
1177-
11781174
class _TypingEmpty:
11791175
"""Internal placeholder for () or []. Used by TupleMeta and CallableMeta
11801176
to allow empty list/tuple in specific places, without allowing them

0 commit comments

Comments
 (0)