Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruff complliance for D406. #5670

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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