Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Pascal Bourgault <[email protected]>
Co-authored-by: Éric Dupuis <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2024
1 parent d2e9611 commit 366b5e3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion xclim/core/datachecks.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def check_freq(


def check_daily(var: xr.DataArray) -> None:
"""Raise an error if not series has a frequency other that daily, or is not monotonically increasing.
"""Raise an error if series has a frequency other that daily, or is not monotonically increasing.
Parameters
----------
Expand Down
8 changes: 3 additions & 5 deletions xclim/core/dataflags.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,7 @@ def temperature_extremely_low(
da : xarray.DataArray
The DataArray of temperatures being examined.
thresh : str
The threshold to search array for that will trigger flag if any day exceeds value.
Default is -90 degrees Celsius.
Threshold below which temperatures are considered problematic and a flag is raised. Default is -90 degrees Celsius.
Returns
-------
Expand Down Expand Up @@ -274,8 +273,7 @@ def temperature_extremely_high(
da : xarray.DataArray
The DatArray of temperature being examined.
thresh : str
The threshold to search array for that will trigger flag if any day exceeds value.
Default is 60 degrees Celsius.
Threshold above which temperatures are considered problematic and a flag is raised. Default is 60 degrees Celsius.
Returns
-------
Expand Down Expand Up @@ -638,7 +636,7 @@ def data_flags( # noqa: C901
... )
"""

def _get_variable_name(function, _kwargs): #
def _get_variable_name(function, _kwargs):
format_args = {}
_kwargs = _kwargs or {}
for arg, param in signature(function).parameters.items():
Expand Down
4 changes: 2 additions & 2 deletions xclim/core/indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def update(self, other: dict) -> None:

@classmethod
def is_parameter_dict(cls, other: dict) -> bool:
"""Return whether other can update a parameter dictionary.
"""Return whether `other` can update a parameter dictionary.
Parameters
----------
Expand All @@ -232,7 +232,7 @@ def is_parameter_dict(cls, other: dict) -> bool:
Returns
-------
bool
Whether other can update a parameter dictionary.
Whether `other` can update a parameter dictionary.
"""
# Passing compute_name is forbidden.
# name is valid, but is handled by the indicator
Expand Down
2 changes: 1 addition & 1 deletion xclim/core/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def execute(
indexer : dict
Time attribute and values over which to subset the array. For example, use season='DJF' to select winter
values, month=1 to select January, or month=[6,7,8] to select summer months.
If not indexer is given, all values are considered.
If no indexer is given, all values are considered.
Returns
-------
Expand Down

0 comments on commit 366b5e3

Please sign in to comment.