提交 6e56d1bd 编写于 作者: M Megvii Engine Team

chore(mge/deprecated): add __deprecated__ attr for condition case

GitOrigin-RevId: 6d8e7398e4a06ee90c0bdbebec3f0290c12b5aa4
上级 98460f58
...@@ -33,6 +33,7 @@ def deprecated_func(version, origin, name, tbd): ...@@ -33,6 +33,7 @@ def deprecated_func(version, origin, name, tbd):
) )
return func(*args, **kwargs) return func(*args, **kwargs)
wrapper.__deprecated__ = True
return wrapper return wrapper
...@@ -57,6 +58,7 @@ def deprecated_kwargs_default(version, kwargs_name, kwargs_pos): ...@@ -57,6 +58,7 @@ def deprecated_kwargs_default(version, kwargs_name, kwargs_pos):
) )
return func(*args, **kwargs) return func(*args, **kwargs)
wrapper.__deprecated__ = True
return wrapper return wrapper
return deprecated return deprecated
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册