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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 8 additions and 66 deletions

View file

@ -139,7 +139,6 @@
'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(