pastas.decorators.deprecate_args_or_kwargs#
- pastas.decorators.deprecate_args_or_kwargs(name: str, version: str, reason: str = '') None#
Provide a warning or error when a function argument is deprecated.
This function raises errors or warnings based on the current Pastas version and the deprecation timeline. The behavior is:
If current version < version: logs a warning
If current version >= version: raises TypeError which indicates that it can be
removed from the codebase entirely in the (near) future.
- Parameters:
- Raises:
DeprecationWarning – If current version < version and the argument is used.
TypeError – If current version >= version and the argument is used.