deprecated - Tinker Documentation
tinker_cookbook.utils.deprecated
tinker_cookbook.utils.deprecated( func, message, removal_version)
Decorator to mark a function or class as deprecated.
Can be used with or without arguments::
@deprecated def old(): ...
@deprecated(message="Use new_func instead.", removal_version="0.20.0") def old(): ...
When applied to a class, the warning is emitted at instantiation time.
Parameters:
- _func ( Callable[..., Any] | None)
- message ( str)
- removal_version ( str | None)
Returns: Any