改写战斗中替换group的逻辑
This commit is contained in:
commit
7f89eb0db8
3890 changed files with 82290 additions and 0 deletions
13
mower/utils/deprecated.py
Normal file
13
mower/utils/deprecated.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
import functools
|
||||
|
||||
from mower.utils.log import logger
|
||||
from mower.utils.traceback import caller_info
|
||||
|
||||
|
||||
def deprecated(func):
|
||||
@functools.wraps(func)
|
||||
def new_func(*args, **kwargs):
|
||||
logger.warning(f"已弃用的函数{func.__name__}被{caller_info()}调用")
|
||||
return func(*args, **kwargs)
|
||||
|
||||
return new_func
|
Loading…
Add table
Add a link
Reference in a new issue