mirror of https://github.com/python/cpython
Remove unused `_allowed_types` from `typing.py` (#124090)
This commit is contained in:
parent
1de46136b9
commit
9dacf430c2
|
@ -29,7 +29,7 @@ import functools
|
||||||
import operator
|
import operator
|
||||||
import sys
|
import sys
|
||||||
import types
|
import types
|
||||||
from types import WrapperDescriptorType, MethodWrapperType, MethodDescriptorType, GenericAlias
|
from types import GenericAlias
|
||||||
|
|
||||||
from _typing import (
|
from _typing import (
|
||||||
_idfunc,
|
_idfunc,
|
||||||
|
@ -2352,11 +2352,6 @@ def assert_type(val, typ, /):
|
||||||
return val
|
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,
|
def get_type_hints(obj, globalns=None, localns=None, include_extras=False,
|
||||||
*, format=annotationlib.Format.VALUE):
|
*, format=annotationlib.Format.VALUE):
|
||||||
"""Return type hints for an object.
|
"""Return type hints for an object.
|
||||||
|
|
Loading…
Reference in New Issue