From: sobolevn Date: Sat, 14 Sep 2024 13:14:45 +0000 (+0300) Subject: Remove unused `_allowed_types` from `typing.py` (#124090) X-Git-Tag: v3.14.0a1~472 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9dacf430c2f4af2acd870291a649b7b957efcd2c;p=thirdparty%2FPython%2Fcpython.git Remove unused `_allowed_types` from `typing.py` (#124090) --- diff --git a/Lib/typing.py b/Lib/typing.py index bcb7bec23a9a..9377e771d60f 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -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.