deprecate_positional_args_since#

sunpy.util.deprecate_positional_args_since(func=None, *, since)[source]#

Decorator for methods that issues warnings for positional arguments.

Using the keyword-only argument syntax in pep 3102, arguments after the * will issue a warning when passed as a positional argument.

Note that when you apply this, you also have to put at * in the signature to create new keyword only parameters!

Parameters:
  • func (callable, default=None) – Function to check arguments on.

  • since (str) – The version since when positional arguments will result in error.

Notes

Taken from from scikit-learn. Licensed under the BSD, see “licenses/SCIKIT-LEARN.rst”.