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 rule D411 compliance. #5657

Merged
merged 3 commits into from
Dec 19, 2023
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 @@ -49,7 +49,6 @@ lint.ignore = [
"D407", # Missing dashed underline after section
"D409", # Section underline should match the length of its name
"D410", # Missing blank line after section
"D411", # Missing blank line before section
"D412", # No blank lines allowed between a section header and its content

# pyupgrade (UP)
Expand Down
1 change: 1 addition & 0 deletions lib/iris/analysis/_regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@ def _create_cube(data, src, src_dims, tgt_coords, num_tgt_dims, regrid_callback)
regrid_callback : callable
The routine that will be used to calculate the interpolated
values of any reference surfaces.

Returns
-------
cube
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
""" # noqa: D214, D411

def __init__(self, lhs=None, rhs=None):
"""Resolve the provided ``lhs`` :class:`~iris.cube.Cube` operand and
Expand Down Expand Up @@ -2493,7 +2493,7 @@ def mapped(self):
>>> resolver.map_rhs_to_lhs
False

""" # noqa: D214
""" # noqa: D214, D411
result = None
if self.mapping is not None:
result = self._src_cube.ndim == len(self.mapping)
Expand Down Expand Up @@ -2554,5 +2554,5 @@ def shape(self):
>>> Resolve(cube2, cube1).shape
(240, 37, 49)

""" # noqa: D214
""" # noqa: D214, 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 @@ -4521,7 +4521,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
""" # noqa: D214, D411
# Update weights kwargs (if necessary) to handle different types of
# weights
weights_info = None
Expand Down
12 changes: 6 additions & 6 deletions lib/iris/fileformats/dot.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,16 +337,16 @@ def _coord_system_text(cs, uid):
def _dot_node(indent, id, name, attributes):
"""Return a string containing the dot representation for a single node.

Args
----
id
Parameters
----------
id :
The ID of the node.
name
name :
The visual name of the node.
attributes
attributes:
An iterable of (name, value) attribute pairs.

"""
""" # noqa: D411
attributes = r"\n".join("%s: %s" % item for item in attributes)
template = """%(indent)s"%(id)s" [
%(indent)s label = "%(name)s|%(attributes)s"
Expand Down