From f3e9447e78c97fb27302afd38d6ed9bb7933168f Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Wed, 31 May 2023 15:03:24 -0400 Subject: [PATCH] Add docstring --- xclim/core/utils.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xclim/core/utils.py b/xclim/core/utils.py index 069c52d09..9c286cc33 100644 --- a/xclim/core/utils.py +++ b/xclim/core/utils.py @@ -582,9 +582,16 @@ class InputKind(IntEnum): """ -def infer_kind_from_parameter(param: Parameter, has_units: bool = False) -> InputKind: +def infer_kind_from_parameter(param, has_units: bool = False) -> InputKind: """Return the appropriate InputKind constant from an ``inspect.Parameter`` object. + Parameters + ---------- + param : Parameter + has_units : bool + + Notes + ----- The correspondence between parameters and kinds is documented in :py:class:`xclim.core.utils.InputKind`. The only information not inferable through the `inspect` object is whether the parameter has been assigned units through the :py:func:`xclim.core.units.declare_units` decorator.