diff --git a/.ruff.toml b/.ruff.toml index 2b2b19f247..49aacc5663 100644 --- a/.ruff.toml +++ b/.ruff.toml @@ -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: ... @@ -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) diff --git a/lib/iris/analysis/_regrid.py b/lib/iris/analysis/_regrid.py index 3e9074fc6b..b2ce99ee7a 100644 --- a/lib/iris/analysis/_regrid.py +++ b/lib/iris/analysis/_regrid.py @@ -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 diff --git a/lib/iris/common/resolve.py b/lib/iris/common/resolve.py index 9124483dac..ec73792915 100644 --- a/lib/iris/common/resolve.py +++ b/lib/iris/common/resolve.py @@ -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 @@ -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) @@ -2554,5 +2554,5 @@ def shape(self): >>> Resolve(cube2, cube1).shape (240, 37, 49) - """ # noqa: D214 + """ # noqa: D214, D411 return self._broadcast_shape diff --git a/lib/iris/cube.py b/lib/iris/cube.py index cb9fc02520..44ca2777bb 100644 --- a/lib/iris/cube.py +++ b/lib/iris/cube.py @@ -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 diff --git a/lib/iris/fileformats/dot.py b/lib/iris/fileformats/dot.py index 6175dd553f..ff0e26bf84 100644 --- a/lib/iris/fileformats/dot.py +++ b/lib/iris/fileformats/dot.py @@ -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" diff --git a/lib/iris/tests/unit/analysis/geometry/test_geometry_area_weights.py b/lib/iris/tests/unit/analysis/geometry/test_geometry_area_weights.py index 29b3ba8c7e..5d7d39dfc4 100644 --- a/lib/iris/tests/unit/analysis/geometry/test_geometry_area_weights.py +++ b/lib/iris/tests/unit/analysis/geometry/test_geometry_area_weights.py @@ -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.