pastas.decorators.deprecate_args_or_kwargs ========================================== .. py:function:: 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. :param name: The name of the argument that is deprecated. :type name: str :param version: The version in which using the argument will raise a TypeError. :type version: str :param reason: The reason why the argument is deprecated, or a message directing users to an alternative. Default is an empty string. :type reason: str, optional :raises FutureWarning: If current version < version and the argument is used. :raises TypeError: If current version >= version and the argument is used. .. !! processed by numpydoc !!