]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove unused `_allowed_types` from `typing.py` (#124090)
authorsobolevn <mail@sobolevn.me>
Sat, 14 Sep 2024 13:14:45 +0000 (16:14 +0300)
committerGitHub <noreply@github.com>
Sat, 14 Sep 2024 13:14:45 +0000 (16:14 +0300)
Lib/typing.py

index bcb7bec23a9aa1b5812ede60a248b84f3c4af0a2..9377e771d60f4bf18f1c9c039e8007b7b0366fad 100644 (file)
@@ -29,7 +29,7 @@ import functools
 import operator
 import sys
 import types
-from types import WrapperDescriptorType, MethodWrapperType, MethodDescriptorType, GenericAlias
+from types import GenericAlias
 
 from _typing import (
     _idfunc,
@@ -2352,11 +2352,6 @@ def assert_type(val, typ, /):
     return val
 
 
-_allowed_types = (types.FunctionType, types.BuiltinFunctionType,
-                  types.MethodType, types.ModuleType,
-                  WrapperDescriptorType, MethodWrapperType, MethodDescriptorType)
-
-
 def get_type_hints(obj, globalns=None, localns=None, include_extras=False,
                    *, format=annotationlib.Format.VALUE):
     """Return type hints for an object.