Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into ruff8
Browse files Browse the repository at this point in the history
* upstream/main:
  ruff rule D411 compliance. (SciTools#5657)
  ruff rule D208 compliance. (SciTools#5656)
  • Loading branch information
tkknight committed Dec 20, 2023
2 parents 9902546 + 52fd4ab commit d8e3f90
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 16 deletions.
2 changes: 0 additions & 2 deletions .ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ lint.ignore = [
"D200", # One-line docstring should fit on one line
"D202", # No blank lines allowed after function docstring
"D205", # 1 blank line required between summary line and description
"D208", # Docstring is over-indented
"D209", # Multi-line docstring closing quotes should be on a separate line
"D211", # No blank lines allowed before class docstring
"D401", # First line of docstring should be in imperative mood: ...
Expand All @@ -48,7 +47,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
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
#
# This file is part of Iris and is released under the BSD license.
# See LICENSE in the root of the repository for full licensing details.
"""Unit tests for the :func:`iris.analysis.geometry.geometry_area_weights`
function.
"""
"""Unit tests for the :func:`iris.analysis.geometry.geometry_area_weights` function."""

# Import iris.tests first so that some things can be initialised before
# importing anything else.
Expand Down

0 comments on commit d8e3f90

Please sign in to comment.