mirror of
https://github.com/Evil0ctal/Douyin_TikTok_Download_API.git
synced 2025-04-23 07:34:27 +08:00
18 lines
419 B
Python
18 lines
419 B
Python
import warnings
|
|
import functools
|
|
|
|
|
|
def deprecated(message):
|
|
def decorator(func):
|
|
@functools.wraps(func)
|
|
async def wrapper(*args, **kwargs):
|
|
warnings.warn(
|
|
f"{func.__name__} is deprecated: {message}",
|
|
DeprecationWarning,
|
|
stacklevel=2
|
|
)
|
|
return await func(*args, **kwargs)
|
|
|
|
return wrapper
|
|
|
|
return decorator |