gh-133601: Remove deprecated typing.no_type_check_decorator (#133602)

This commit is contained in:
sobolevn
2025-10-21 00:10:44 +03:00
committed by GitHub
parent a752f58d6b
commit e09837fcbf
8 changed files with 8 additions and 66 deletions

View File

@@ -139,7 +139,6 @@ __all__ = [
'Never',
'NewType',
'no_type_check',
'no_type_check_decorator',
'NoDefault',
'NoExtraItems',
'NoReturn',
@@ -2623,23 +2622,6 @@ def no_type_check(arg):
return arg
def no_type_check_decorator(decorator):
"""Decorator to give another decorator the @no_type_check effect.
This wraps the decorator with something that wraps the decorated
function in @no_type_check.
"""
import warnings
warnings._deprecated("typing.no_type_check_decorator", remove=(3, 15))
@functools.wraps(decorator)
def wrapped_decorator(*args, **kwds):
func = decorator(*args, **kwds)
func = no_type_check(func)
return func
return wrapped_decorator
def _overload_dummy(*args, **kwds):
"""Helper for @overload to raise when called."""
raise NotImplementedError(