Skip to content

Commit

Permalink
ruff complliance for D406. (#5670)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkknight authored Jan 3, 2024
1 parent e2e9454 commit a8da1fb
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ lint.ignore = [
"D205", # 1 blank line required between summary line and description
"D401", # First line of docstring should be in imperative mood: ...
"D404", # First word of the docstring should not be "This"
"D406", # Section name should end with a newline

# pyupgrade (UP)
# https://docs.astral.sh/ruff/rules/#pyupgrade-up
Expand Down
6 changes: 3 additions & 3 deletions lib/iris/common/resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class Resolve:
>>> resolver = Resolve(cube1, cube2)
>>> results = [resolver.cube(data) for data in payload]
""" # noqa: D214, D407, D410, D411
""" # noqa: D214, D406, D407, D410, D411

def __init__(self, lhs=None, rhs=None):
"""Resolve the provided ``lhs`` :class:`~iris.cube.Cube` operand and
Expand Down Expand Up @@ -2474,7 +2474,7 @@ def mapped(self):
>>> resolver.map_rhs_to_lhs
False
""" # noqa: D214, D407, D410, D411
""" # noqa: D214, D406, D407, D410, D411
result = None
if self.mapping is not None:
result = self._src_cube.ndim == len(self.mapping)
Expand Down Expand Up @@ -2535,5 +2535,5 @@ def shape(self):
>>> Resolve(cube2, cube1).shape
(240, 37, 49)
""" # noqa: D214, D407, D410, D411
""" # noqa: D214, D406, D407, D410, D411
return self._broadcast_shape
2 changes: 1 addition & 1 deletion lib/iris/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -4547,7 +4547,7 @@ def rolling_window(self, coord, aggregator, window, **kwargs):
Notice that the forecast_period dimension now represents the 4
possible windows of size 3 from the original cube.
""" # noqa: D214, D407, D410, D411
""" # noqa: D214, D406, D407, D410, D411

# Update weights kwargs (if necessary) to handle different types of
# weights
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/fileformats/pp_load_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ def _model_level_number(lblev):
lblev : int
PP field LBLEV value.
Returns:
Returns
-------
Model level number (int).
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/tests/test_concatenate.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def _make_cube_3d(x, y, z, data, aux=None, offset=0):
Offset value to be added to non-1D auxiliary coordinate
points.
Returns:
Returns
-------
The newly created 3D :class:`iris.cube.Cube`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def vars_meshdim(vars, location, mesh_name=None):
If given, identifies the mesh var.
Otherwise, find a unique mesh var (i.e. there must be exactly 1).
Returns:
Returns
-------
dim_name : str
The dim-name of the mesh dim for the given location.
Expand Down

0 comments on commit a8da1fb

Please sign in to comment.