Skip to content

Commit f966738

Browse files
authored
ruff complliance for D100. (#5678)
1 parent 8aa0442 commit f966738

24 files changed

+61
-2
lines changed

Diff for: .ruff.toml

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ lint.ignore = [
2828
"D101", # Missing docstring in public class
2929
"D102", # Missing docstring in public method
3030
# (D-3) Temporary, before an initial review, either fix ocurrences or move to (2).
31-
"D100", # Missing docstring in public module
3231
"D103", # Missing docstring in public function
3332
"D205", # 1 blank line required between summary line and description
3433
"D401", # First line of docstring should be in imperative mood: ...

Diff for: benchmarks/benchmarks/import_iris.py

+3
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
#
33
# This file is part of Iris and is released under the BSD license.
44
# See LICENSE in the root of the repository for full licensing details.
5+
6+
"""import iris benchmarking."""
7+
58
from importlib import import_module, reload
69

710
################

Diff for: docs/gallery_tests/test_gallery_examples.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# This file is part of Iris and is released under the BSD license.
44
# See LICENSE in the root of the repository for full licensing details.
55

6+
"""Test all the gallery examples."""
7+
68
import importlib
79

810
import matplotlib.pyplot as plt

Diff for: docs/src/conf.py

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
# serve to show the default.
1818
# ----------------------------------------------------------------------------
1919

20+
"""sphinx config."""
21+
2022
import datetime
2123
from importlib.metadata import version as get_version
2224
import ntpath

Diff for: docs/src/developers_guide/documenting/docstrings_attribute.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"""docstring attribute example."""
2+
3+
14
class ExampleClass:
25
"""Class Summary."""
36

Diff for: docs/src/developers_guide/documenting/docstrings_sample_routine.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
"""docstring routine example."""
2+
3+
14
def sample_routine(arg1, arg2, kwarg1="foo", kwarg2=None):
25
"""Purpose section text goes here.
36

Diff for: docs/src/userguide/plotting_examples/1d_quickplot_simple.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Simple 1D plot using iris.quickplot.plot()."""
2+
13
import matplotlib.pyplot as plt
24

35
import iris

Diff for: docs/src/userguide/plotting_examples/1d_simple.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Simple 1D plot using iris.plot.plot()."""
2+
13
import matplotlib.pyplot as plt
24

35
import iris

Diff for: docs/src/userguide/plotting_examples/1d_with_legend.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Simple 1D plot using iris.plot.plot() with a legend."""
2+
13
import matplotlib.pyplot as plt
24

35
import iris

Diff for: docs/src/userguide/plotting_examples/brewer.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Plot a chart of all Brewer colour schemes."""
2+
13
import matplotlib.pyplot as plt
24
import numpy as np
35

Diff for: docs/src/userguide/plotting_examples/cube_blockplot.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Cube block plot using using iris.plot.pcolormesh()."""
2+
13
import matplotlib.pyplot as plt
24

35
import iris

Diff for: docs/src/userguide/plotting_examples/cube_brewer_cite_contourf.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Addind a citation for a plot using iris.plot.citation()."""
2+
13
import matplotlib.pyplot as plt
24

35
import iris

Diff for: docs/src/userguide/plotting_examples/cube_brewer_contourf.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Plot a cube with a Brewer colour palette using iris.quickplot.contourf()."""
2+
13
import matplotlib.cm as mpl_cm
24
import matplotlib.pyplot as plt
35

Diff for: docs/src/userguide/plotting_examples/cube_contour.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""Simple contour plot of a cube.
2+
3+
Can use iris.plot.contour() or iris.quicplot.contour().
4+
5+
"""
16
import matplotlib.pyplot as plt
27

38
import iris

Diff for: docs/src/userguide/plotting_examples/cube_contourf.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
"""Simple filled contour plot of a cube.
2+
3+
Can use iris.plot.contour() or iris.quickplot.contour().
4+
5+
"""
16
import matplotlib.pyplot as plt
27

38
import iris

Diff for: docs/src/userguide/regridding_plots/interpolate_column.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Interpolate using iris.analysis.Linear()."""
2+
13
import matplotlib.pyplot as plt
24
import numpy as np
35

Diff for: docs/src/userguide/regridding_plots/regridded_to_global.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Interpolate using iris.analysis.Linear()."""
2+
13
import matplotlib.pyplot as plt
24

35
import iris

Diff for: docs/src/userguide/regridding_plots/regridded_to_global_area_weighted.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Regrid using iris.analysis.AreaWeighted."""
2+
13
import matplotlib.colors
24
import matplotlib.pyplot as plt
35
import numpy as np

Diff for: docs/src/userguide/regridding_plots/regridded_to_rotated.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Rotated pole."""
2+
13
import matplotlib.pyplot as plt
24

35
import iris

Diff for: docs/src/userguide/regridding_plots/regridding_plot.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Plot regridded data."""
2+
13
import matplotlib.pyplot as plt
24

35
import iris

Diff for: lib/iris/fileformats/pp_load_rules.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
# This file is part of Iris and is released under the BSD license.
44
# See LICENSE in the root of the repository for full licensing details.
55

6-
76
# Historically this was auto-generated from
87
# SciTools/iris-code-generators:tools/gen_rules.py
98

9+
"""PP Load Rules."""
10+
1011
import calendar
1112
from functools import wraps
1213

Diff for: lib/iris/fileformats/pp_save_rules.py

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
# This file is part of Iris and is released under the BSD license.
44
# See LICENSE in the root of the repository for full licensing details.
55

6+
"""PP Save Rules."""
7+
68
import warnings
79

810
import cftime

Diff for: pyproject.toml

+8
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,14 @@ ignore = [
103103
force-sort-within-sections = true
104104
known-first-party = ["iris"]
105105

106+
[tool.ruff.lint.per-file-ignores]
107+
# All test scripts
108+
"test_*.py" = [
109+
# https://docs.astral.sh/ruff/rules/undocumented-public-module/
110+
"D100", # Missing docstring in public module
111+
]
112+
113+
106114
[tool.ruff.lint.pydocstyle]
107115
convention = "numpy"
108116

Diff for: setup.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""Iris setup."""
2+
13
import os
24
import sys
35

0 commit comments

Comments
 (0)