Skip to content

Commit

Permalink
ruff rule D411 compliance. (SciTools#5657)
Browse files Browse the repository at this point in the history
* ruff rule D411 complliance.

* removed comment

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
tkknight and pre-commit-ci[bot] authored Dec 19, 2023
1 parent 203d6d2 commit 52fd4ab
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
1 change: 0 additions & 1 deletion .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,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

0 comments on commit 52fd4ab

Please sign in to comment.