删除 Log4p/DecoratorsTools.py
This commit is contained in:
parent
e5aa752c59
commit
8108e1fc85
|
@ -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
|
|
Loading…
Reference in New Issue
Block a user