diff --git a/doc/source/tutorials/notebooks/DCSC_txnn.ipynb b/doc/source/tutorials/notebooks/DCSC_txnn.ipynb index 8cc628ad..963e128b 100644 --- a/doc/source/tutorials/notebooks/DCSC_txnn.ipynb +++ b/doc/source/tutorials/notebooks/DCSC_txnn.ipynb @@ -47,19 +47,19 @@ } ], "source": [ - "import datetime\n", "import sys\n", "from pathlib import Path\n", "\n", "import cartopy.crs as ccrs\n", "import cftime\n", - "import icclim\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import xarray as xr\n", "import xclim\n", - "from xclim.core.calendar import select_time \n", + "from xclim.core.calendar import select_time\n", + "\n", + "import icclim\n", "from icclim.frequency import FrequencyRegistry\n", "\n", "print(\"python: \", sys.version)\n", @@ -68,7 +68,7 @@ "print(\"pandas: \", pd.__version__)\n", "print(\"icclim: \", icclim.__version__)\n", "print(\"cftime: \", cftime.__version__)\n", - "print(\"xclim: \", xclim.__version__)\n" + "print(\"xclim: \", xclim.__version__)" ] }, { @@ -664,7 +664,9 @@ ], "source": [ "historical_tas = xr.open_mfdataset(historical_files).tas\n", - "filtered_tas = select_time(historical_tas, month=FrequencyRegistry.AMJJAS.indexer[\"month\"], drop=True)\n", + "filtered_tas = select_time(\n", + " historical_tas, month=FrequencyRegistry.AMJJAS.indexer[\"month\"], drop=True\n", + ")\n", "normal = filtered_tas.mean(dim=\"time\", keep_attrs=True)\n", "normal" ] @@ -1291,7 +1293,7 @@ "source": [ "icclim.dcsc.txnd(\n", " in_files=studied_files[0:1],\n", - " normal = normal,\n", + " normal=normal,\n", " var_name=\"tas\",\n", " slice_mode=FrequencyRegistry.AMJJAS,\n", " out_file=out_f,\n", diff --git a/doc/source/tutorials/notebooks/averaged_tas_anomaly.ipynb b/doc/source/tutorials/notebooks/averaged_tas_anomaly.ipynb index 80ac16e7..0d86bbed 100644 --- a/doc/source/tutorials/notebooks/averaged_tas_anomaly.ipynb +++ b/doc/source/tutorials/notebooks/averaged_tas_anomaly.ipynb @@ -125,13 +125,13 @@ "import sys\n", "from pathlib import Path\n", "\n", - "import icclim\n", - "\n", "# provides cftime axis in matplotlib\n", "import numpy as np\n", "import pandas as pd\n", "import xarray as xr\n", "\n", + "import icclim\n", + "\n", "print(\"python: \", sys.version)\n", "print(\"numpy: \", np.__version__)\n", "print(\"xarray: \", xr.__version__)\n", diff --git a/doc/source/tutorials/notebooks/cold_spell_duration.ipynb b/doc/source/tutorials/notebooks/cold_spell_duration.ipynb index d5c60d24..cca7885c 100644 --- a/doc/source/tutorials/notebooks/cold_spell_duration.ipynb +++ b/doc/source/tutorials/notebooks/cold_spell_duration.ipynb @@ -333,9 +333,6 @@ "# CDS API\n", "import cdsapi\n", "\n", - "# icclim package for calculating climate indices\n", - "import icclim\n", - "\n", "# Libraries for plotting and visualising data\n", "import matplotlib.pyplot as plt\n", "\n", @@ -346,6 +343,9 @@ "import urllib3\n", "import xarray as xr\n", "\n", + "# icclim package for calculating climate indices\n", + "import icclim\n", + "\n", "# To add specific units spelling\n", "\n", "urllib3.disable_warnings()\n", diff --git a/doc/source/tutorials/notebooks/custom_freezing_tas.ipynb b/doc/source/tutorials/notebooks/custom_freezing_tas.ipynb index a8e6ed29..280c147b 100644 --- a/doc/source/tutorials/notebooks/custom_freezing_tas.ipynb +++ b/doc/source/tutorials/notebooks/custom_freezing_tas.ipynb @@ -129,12 +129,13 @@ "\n", "import cartopy.crs as ccrs\n", "import cftime\n", - "import icclim\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import xarray as xr\n", "\n", + "import icclim\n", + "\n", "print(\"python: \", sys.version)\n", "print(\"numpy: \", np.__version__)\n", "print(\"xarray: \", xr.__version__)\n", diff --git a/doc/source/tutorials/notebooks/deltaT_deltaP_anomaly.ipynb b/doc/source/tutorials/notebooks/deltaT_deltaP_anomaly.ipynb index 88fc8b51..548e3102 100644 --- a/doc/source/tutorials/notebooks/deltaT_deltaP_anomaly.ipynb +++ b/doc/source/tutorials/notebooks/deltaT_deltaP_anomaly.ipynb @@ -131,12 +131,13 @@ "from pathlib import Path\n", "\n", "import cftime\n", - "import icclim\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import xarray as xr\n", "\n", + "import icclim\n", + "\n", "print(\"python: \", sys.version)\n", "print(\"numpy: \", np.__version__)\n", "print(\"xarray: \", xr.__version__)\n", diff --git a/doc/source/tutorials/notebooks/su_summer_days__subset_and_plot.ipynb b/doc/source/tutorials/notebooks/su_summer_days__subset_and_plot.ipynb index 2a6247f7..b01aa1f5 100644 --- a/doc/source/tutorials/notebooks/su_summer_days__subset_and_plot.ipynb +++ b/doc/source/tutorials/notebooks/su_summer_days__subset_and_plot.ipynb @@ -129,12 +129,13 @@ "\n", "import cartopy.crs as ccrs\n", "import cftime\n", - "import icclim\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import xarray as xr\n", "\n", + "import icclim\n", + "\n", "print(\"python: \", sys.version)\n", "print(\"numpy: \", np.__version__)\n", "print(\"xarray: \", xr.__version__)\n", diff --git a/doc/source/tutorials/notebooks/tg90p_calculate__subset_and_plot.ipynb b/doc/source/tutorials/notebooks/tg90p_calculate__subset_and_plot.ipynb index fa90e28e..4ab780eb 100644 --- a/doc/source/tutorials/notebooks/tg90p_calculate__subset_and_plot.ipynb +++ b/doc/source/tutorials/notebooks/tg90p_calculate__subset_and_plot.ipynb @@ -133,12 +133,13 @@ "import cartopy.crs as ccrs\n", "import cftime\n", "import dask\n", - "import icclim\n", "import matplotlib.pyplot as plt\n", "import numpy as np\n", "import pandas as pd\n", "import xarray as xr\n", "\n", + "import icclim\n", + "\n", "print(\"python: \", sys.version)\n", "print(\"numpy: \", np.__version__)\n", "print(\"pandas: \", pd.__version__)\n", diff --git a/src/icclim/_core/generic/threshold/percentile.py b/src/icclim/_core/generic/threshold/percentile.py index 7d1e7660..b7bffd12 100644 --- a/src/icclim/_core/generic/threshold/percentile.py +++ b/src/icclim/_core/generic/threshold/percentile.py @@ -333,7 +333,7 @@ def compute( self.value, op, self.is_doy_per_threshold, - kwargs.get("freq", None), + kwargs.get("freq"), kwargs.get("bootstrap", False), ) msg = ( diff --git a/src/icclim/_generated/_dcsc.py b/src/icclim/_generated/_dcsc.py index 4ada3435..33b71fb2 100644 --- a/src/icclim/_generated/_dcsc.py +++ b/src/icclim/_generated/_dcsc.py @@ -29,38 +29,38 @@ from icclim.logger import Verbosity __all__ = [ - "tav", - "txav", - "trav", - "tx10", - "tx90", - "tn10", - "tn90", - "tnfd", - "txfd", - "sd", - "tx35", - "tr", - "txnd", - "tnht", - "tnnd", - "tncwd", - "txhwd", - "hdd", "cdd", + "ff98", + "ffav", + "hdd", "pav", + "pfl90", "pint", - "rr", - "rr1mm", "pn20mm", + "pq90", + "pq99", "pxcdd", "pxcwd", "r99", - "pfl90", - "pq90", - "pq99", - "ffav", - "ff98", + "rr", + "rr1mm", + "sd", + "tav", + "tn10", + "tn90", + "tncwd", + "tnfd", + "tnht", + "tnnd", + "tr", + "trav", + "tx10", + "tx35", + "tx90", + "txav", + "txfd", + "txhwd", + "txnd", ] diff --git a/src/icclim/_generated/_ecad.py b/src/icclim/_generated/_ecad.py index a77b723d..d3c85b44 100644 --- a/src/icclim/_generated/_ecad.py +++ b/src/icclim/_generated/_ecad.py @@ -28,70 +28,70 @@ from icclim.logger import Verbosity __all__ = [ - "tg", - "tn", - "tx", + "cd", + "cdd", + "cfd", + "csdi", + "csu", + "cw", + "cwd", + "ddeast", + "ddnorth", + "ddsouth", + "ddwest", "dtr", "etr", - "vdtr", - "su", - "tr", - "wsdi", - "tg90p", - "tn90p", - "tx90p", - "txx", - "tnx", - "csu", - "gd4", "fd", - "cfd", + "fg", + "fg6bft", + "fgcalm", + "fxx", + "gd4", + "gsl", "hd17", "id", - "tg10p", - "tn10p", - "tx10p", - "txn", - "tnn", - "csdi", - "cdd", + "pp", "prcptot", - "rr1", - "sdii", - "cwd", - "rr", "r10mm", "r20mm", - "rx1day", - "rx5day", "r75p", "r75ptot", "r95p", "r95ptot", "r99p", "r99ptot", + "rh", + "rr", + "rr1", + "rx1day", + "rx5day", "sd", "sd1", "sd5cm", "sd50cm", - "cd", - "cw", - "wd", - "ww", - "fxx", - "fg6bft", - "fgcalm", - "fg", - "ddnorth", - "ddeast", - "ddsouth", - "ddwest", - "gsl", - "spi6", + "sdii", "spi3", - "pp", + "spi6", "ss", - "rh", + "su", + "tg", + "tg10p", + "tg90p", + "tn", + "tn10p", + "tn90p", + "tnn", + "tnx", + "tr", + "tx", + "tx10p", + "tx90p", + "txn", + "txx", + "vdtr", + "wd", + "wsdi", + "ww", ] diff --git a/src/icclim/_generated/_generic.py b/src/icclim/_generated/_generic.py index 93fd9df2..3cf14fc6 100644 --- a/src/icclim/_generated/_generic.py +++ b/src/icclim/_generated/_generic.py @@ -29,27 +29,27 @@ from icclim.logger import Verbosity __all__ = [ + "average", "count_occurrences", - "max_consecutive_occurrence", - "sum_of_spell_lengths", - "excess", + "custom_index", "deficit", + "difference_of_extremes", + "difference_of_means", + "excess", "fraction_of_total", - "maximum", - "minimum", - "average", - "sum", - "standard_deviation", - "max_of_rolling_sum", - "min_of_rolling_sum", + "max_consecutive_occurrence", "max_of_rolling_average", - "min_of_rolling_average", - "mean_of_difference", - "difference_of_extremes", + "max_of_rolling_sum", + "maximum", "mean_of_absolute_one_time_step_difference", - "difference_of_means", + "mean_of_difference", + "min_of_rolling_average", + "min_of_rolling_sum", + "minimum", "percentile", - "custom_index", + "standard_deviation", + "sum", + "sum_of_spell_lengths", ] diff --git a/src/icclim/generic/registry.py b/src/icclim/generic/registry.py index d8c9fee5..e313ba9b 100644 --- a/src/icclim/generic/registry.py +++ b/src/icclim/generic/registry.py @@ -73,8 +73,7 @@ def __init__(self) -> None: CountOccurrences = GenericIndicator( "count_occurrences", count_occurrences, - definition="Count occurrences when threshold(s) are met" - " (e.g. SU, Tx90p, RR1).", + definition="Count occurrences when threshold(s) are met (e.g. SU, Tx90p, RR1).", ) MaxConsecutiveOccurrence = GenericIndicator( "max_consecutive_occurrence", diff --git a/src/icclim/main.py b/src/icclim/main.py index 0f73a8e3..78c8a560 100644 --- a/src/icclim/main.py +++ b/src/icclim/main.py @@ -488,7 +488,7 @@ def _build_config( rolling_window_width=rolling_window_width, sampling_method=sampling_method, ) - msg = "You must fill either index_name or user_index" "to compute a climate index." + msg = "You must fill either index_name or user_indexto compute a climate index." raise InvalidIcclimArgumentError(msg) diff --git a/tests/test_cf_calendar.py b/tests/test_cf_calendar.py index e5980072..d318878c 100644 --- a/tests/test_cf_calendar.py +++ b/tests/test_cf_calendar.py @@ -4,6 +4,7 @@ import pandas as pd import pytest import xarray as xr + from icclim._core.model.cf_calendar import CfCalendarRegistry from icclim.exception import InvalidIcclimArgumentError diff --git a/tests/test_dcsc.py b/tests/test_dcsc.py index 600789f5..fea4ddd8 100644 --- a/tests/test_dcsc.py +++ b/tests/test_dcsc.py @@ -1,5 +1,4 @@ from icclim.dcsc import txnd - from tests.testing_utils import stub_tas diff --git a/tests/test_ecad_indices.py b/tests/test_ecad_indices.py index f0b61c51..39ddd855 100644 --- a/tests/test_ecad_indices.py +++ b/tests/test_ecad_indices.py @@ -1,6 +1,7 @@ from __future__ import annotations import pytest + from icclim._core.model.standard_index import StandardIndex from icclim.ecad.registry import EcadIndexRegistry from icclim.exception import InvalidIcclimArgumentError diff --git a/tests/test_frequency.py b/tests/test_frequency.py index b9ca1901..195fe16d 100644 --- a/tests/test_frequency.py +++ b/tests/test_frequency.py @@ -4,9 +4,9 @@ import numpy as np import pandas as pd import pytest + from icclim.exception import InvalidIcclimArgumentError from icclim.frequency import FrequencyRegistry, get_seasonal_time_updater - from tests.testing_utils import stub_tas diff --git a/tests/test_generated_api.py b/tests/test_generated_api.py index b971e026..42c4307e 100644 --- a/tests/test_generated_api.py +++ b/tests/test_generated_api.py @@ -4,9 +4,10 @@ from typing import TYPE_CHECKING from unittest.mock import MagicMock, patch -import icclim import numpy as np import pytest + +import icclim from icclim._core.constants import QUANTILE_BASED, REFERENCE_PERIOD_INDEX from icclim._core.legacy.user_index.calc_operation import ( CalcOperation, @@ -20,7 +21,6 @@ from icclim.generic.registry import GenericIndicatorRegistry from icclim.logger import VerbosityRegistry from icclim.threshold.factory import build_threshold - from tests.testing_utils import stub_tas if TYPE_CHECKING: @@ -137,7 +137,7 @@ def test_txx__season_slice_mode() -> None: res = icclim.txx(tas, slice_mode=["season", [11, 12, 1, 2]]).compute() # THEN # missing values for nov, dec of first period - np.testing.assert_array_equal(res.TXx.isel(time=0), np.NAN) + np.testing.assert_array_equal(res.TXx.isel(time=0), np.nan) np.testing.assert_array_equal(res.TXx.isel(time=1), 30.0) np.testing.assert_array_equal( res.time_bounds.isel(time=0), @@ -151,7 +151,7 @@ def test_txx__months_slice_mode() -> None: tas.loc[{"time": "2042-01-01"}] = 303.15 # 30°C 273.15 res = icclim.txx(tas, slice_mode=["months", [11, 1]]).compute() np.testing.assert_array_equal(res.TXx.isel(time=0), 30) - np.testing.assert_array_equal(res.TXx.isel(time=1), np.NAN) + np.testing.assert_array_equal(res.TXx.isel(time=1), np.nan) np.testing.assert_almost_equal(res.TXx.sel(time="2042-11"), 21.85) np.testing.assert_array_equal( res.time_bounds.isel(time=0), @@ -192,8 +192,8 @@ def test_custom_index__season_slice_mode( }, ).compute() # missing values algo applied for first and last years - np.testing.assert_almost_equal(res.pouet.isel(time=0), np.NAN) - np.testing.assert_almost_equal(res.pouet.isel(time=-1), np.NAN) + np.testing.assert_almost_equal(res.pouet.isel(time=0), np.nan) + np.testing.assert_almost_equal(res.pouet.isel(time=-1), np.nan) np.testing.assert_almost_equal(res.pouet.isel(time=1), expectation_year_1) np.testing.assert_almost_equal(res.pouet.isel(time=2), expectation_year_2) @@ -225,8 +225,8 @@ def test_custom_index_run_algos__season_slice_mode( }, ) # missing values algo applied for first and last years - np.testing.assert_almost_equal(res.pouet.isel(time=0), np.NAN) - np.testing.assert_almost_equal(res.pouet.isel(time=-1), np.NAN) + np.testing.assert_almost_equal(res.pouet.isel(time=0), np.nan) + np.testing.assert_almost_equal(res.pouet.isel(time=-1), np.nan) np.testing.assert_almost_equal(res.pouet.isel(time=1), expectation_year_1) np.testing.assert_almost_equal(res.pouet.isel(time=2), expectation_year_2) @@ -280,12 +280,12 @@ def test_custom_index_anomaly__datetime_ref_period() -> None: }, ).compute() # missing values algo applied for first and last years - np.testing.assert_almost_equal(res.anomaly.sel(time="2041"), np.NAN) + np.testing.assert_almost_equal(res.anomaly.sel(time="2041"), np.nan) np.testing.assert_almost_equal(res.anomaly.sel(time="2042"), 0) np.testing.assert_almost_equal(res.anomaly.sel(time="2043"), 0) np.testing.assert_almost_equal(res.anomaly.sel(time="2044"), 4.80645161) np.testing.assert_almost_equal(res.anomaly.sel(time="2045"), 0) - np.testing.assert_almost_equal(res.anomaly.sel(time="2046"), np.NAN) + np.testing.assert_almost_equal(res.anomaly.sel(time="2046"), np.nan) def test_custom_index_anomaly__groupby_and_resample_month() -> None: diff --git a/tests/test_generic_functions.py b/tests/test_generic_functions.py index c6961f6a..474eae6b 100644 --- a/tests/test_generic_functions.py +++ b/tests/test_generic_functions.py @@ -4,7 +4,6 @@ from icclim._core.model.standard_variable import StandardVariableRegistry from icclim.frequency import FrequencyRegistry from icclim.threshold.factory import build_threshold - from tests.testing_utils import stub_tas diff --git a/tests/test_index_group.py b/tests/test_index_group.py index 92279e5b..04317296 100644 --- a/tests/test_index_group.py +++ b/tests/test_index_group.py @@ -1,6 +1,7 @@ from __future__ import annotations import pytest + from icclim._core.model.index_group import IndexGroupRegistry from icclim.exception import InvalidIcclimArgumentError diff --git a/tests/test_input_parsing.py b/tests/test_input_parsing.py index e364296a..4a81ae4f 100644 --- a/tests/test_input_parsing.py +++ b/tests/test_input_parsing.py @@ -8,6 +8,7 @@ import pandas as pd import pytest import xarray as xr + from icclim._core.constants import UNITS_KEY from icclim._core.input_parsing import ( PercentileDataArray, diff --git a/tests/test_main.py b/tests/test_main.py index a642c812..3944c3a7 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -6,12 +6,13 @@ from unittest.mock import MagicMock, patch import cftime -import icclim import numpy as np import pandas as pd import pint import pytest import xarray as xr + +import icclim from icclim import __version__ as icclim_version from icclim._core.constants import PART_OF_A_WHOLE_UNIT, REFERENCE_PERIOD_ID, UNITS_KEY from icclim._core.model.index_group import IndexGroupRegistry @@ -19,7 +20,6 @@ from icclim.exception import InvalidIcclimArgumentError from icclim.frequency import FrequencyRegistry from icclim.threshold.factory import build_threshold - from tests.testing_utils import K2C, stub_pr, stub_tas @@ -38,7 +38,7 @@ def test_deprecated_indice(log_mock: MagicMock, index_mock: MagicMock) -> None: HEAT_INDICES = ["SU", "TR", "WSDI", "TG90p", "TN90p", "TX90p", "TXx", "TNx", "CSU"] -@pytest.mark.slow() +@pytest.mark.slow class TestIntegration: """ Integration tests. @@ -282,7 +282,7 @@ def test_index_su__djf_cf_time(self) -> None: out_file=self.OUTPUT_FILE, slice_mode=FrequencyRegistry.DJF, ) - np.testing.assert_array_equal(res.SU.isel(time=0), np.NAN) + np.testing.assert_array_equal(res.SU.isel(time=0), np.nan) np.testing.assert_array_equal(res.SU.isel(time=1), 0) # "+ 1" because DJF sampling create a december month with nans before first year np.testing.assert_array_equal( diff --git a/tests/test_rechunk.py b/tests/test_rechunk.py index 11acc4f9..e666d3db 100644 --- a/tests/test_rechunk.py +++ b/tests/test_rechunk.py @@ -6,6 +6,7 @@ import pandas as pd import pytest import xarray as xr + from icclim import create_optimized_zarr_store from icclim._core.constants import UNITS_KEY from icclim.exception import InvalidIcclimArgumentError diff --git a/tests/test_threshold.py b/tests/test_threshold.py index bc592472..168b8565 100644 --- a/tests/test_threshold.py +++ b/tests/test_threshold.py @@ -9,6 +9,9 @@ import pint import pytest import xarray as xr +from xclim.core.calendar import percentile_doy +from xclim.core.units import units as xc_units + from icclim._core.constants import UNITS_KEY from icclim._core.generic.threshold.basic import BasicThreshold from icclim._core.generic.threshold.bounded import BoundedThreshold @@ -18,8 +21,6 @@ from icclim._core.model.operator import OperatorRegistry from icclim.exception import InvalidIcclimArgumentError from icclim.threshold.factory import build_threshold -from xclim.core.calendar import percentile_doy -from xclim.core.units import units as xc_units def test_value_error() -> None: diff --git a/tests/test_user_index.py b/tests/test_user_index.py index d5d1962a..6f47632e 100644 --- a/tests/test_user_index.py +++ b/tests/test_user_index.py @@ -1,5 +1,7 @@ from __future__ import annotations +from xclim.core.calendar import build_climatology_bounds + import icclim from icclim._core.constants import ( UNITS_KEY, @@ -7,8 +9,6 @@ USER_INDEX_TEMPERATURE_STAMP, ) from icclim._core.model.operator import OperatorRegistry -from xclim.core.calendar import build_climatology_bounds - from tests.testing_utils import stub_tas diff --git a/tests/testing_utils.py b/tests/testing_utils.py index da93a55b..4add35df 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -3,6 +3,7 @@ import numpy as np import pandas as pd import xarray as xr + from icclim._core.constants import UNITS_KEY VALUE_COUNT = 365 * 5 + 1 # 5 years of data (with 1 leap year) diff --git a/tools/extract_icclim_funs.py b/tools/extract_icclim_funs.py index b1909bdc..a12de291 100644 --- a/tools/extract_icclim_funs.py +++ b/tools/extract_icclim_funs.py @@ -27,8 +27,9 @@ from pathlib import Path from typing import TYPE_CHECKING -import icclim from docstring_parser import Docstring, DocstringParam, DocstringStyle, compose, parse + +import icclim from icclim._core.constants import NEEDS_NORMAL, QUANTILE_BASED, REFERENCE_PERIOD_INDEX from icclim._core.generic.threshold.percentile import PercentileThreshold from icclim._core.input_parsing import get_dataarray_from_dataset @@ -47,10 +48,11 @@ if TYPE_CHECKING: from collections.abc import Sequence + from xarray import DataArray, Dataset + from icclim._core.generic.indicator import GenericIndicator from icclim._core.model.registry import Registry from icclim._core.model.standard_index import StandardIndex - from xarray import DataArray, Dataset QUANTILE_INDEX_FIELDS = [ @@ -281,8 +283,8 @@ def {index.name.lower()}( def _normal_index_placeholder( # noqa: ANN202 - normal: str | Sequence[str] | Dataset | DataArray, # noqa: ARG001 - normal_var_name: str | None = None, # noqa: ARG001 + normal: str | Sequence[str] | Dataset | DataArray, + normal_var_name: str | None = None, ): """ Parameters @@ -342,7 +344,7 @@ def {index.short_name.lower()}( threshold = standard_index.threshold threshold.prepare(normal_da) return icclim.index( - index_name={registry.__name__}.{index_name_arg }, + index_name={registry.__name__}.{index_name_arg}, {formatted_args}, ) """ @@ -386,7 +388,7 @@ def {index.short_name.lower()}( {END_NOTE} \"\"\" # noqa: D401 return icclim.index( - index_name={registry.__name__}.{index_name_arg }, + index_name={registry.__name__}.{index_name_arg}, {formatted_args}, ) """