Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into ruff9
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 0eee062 + 52fd4ab commit a10f58c
Show file tree
Hide file tree
Showing 5 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
"D300", # triple double quotes `""" / Use triple single quotes `'''`
Expand All @@ -47,7 +46,6 @@ lint.ignore = [
"D405", # Section name should be properly capitalized
"D406", # Section name should end with a newline
"D407", # Missing dashed underline after section
"D411", # Missing blank line before section
"D412", # No blank lines allowed between a section header and its content

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

def __init__(self, lhs=None, rhs=None):
"""Resolve the provided ``lhs`` :class:`~iris.cube.Cube` operand and
Expand Down Expand Up @@ -2494,7 +2494,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 @@ -2556,5 +2556,5 @@ def shape(self):
>>> Resolve(cube2, cube1).shape
(240, 37, 49)
""" # noqa: D214
""" # noqa: D214, D411
return self._broadcast_shape
3 changes: 2 additions & 1 deletion lib/iris/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -4521,7 +4521,8 @@ 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, D410
""" # noqa: D214, D410, 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 a10f58c

Please sign in to comment.