删除 Log4p/DecoratorsTools.py

This commit is contained in:
芙宁娜 2024-03-17 14:08:09 +00:00
parent e5aa752c59
commit 8108e1fc85

View File

@ -1,11 +0,0 @@
import warnings
def deprecated(use_func, d_version):
def decorator(func):
async def wrapper(*args, **kwargs):
warnings.warn(f"The '{func.__name__}' function is deprecated, "
f"use '{use_func}' instead. Deprecated in version {d_version}.",
DeprecationWarning, stacklevel=2)
return await func(*args, **kwargs)
return wrapper
return decorator