Skip to content

Commit a5a4e2c

Browse files
authored
codespell fixes (#5546)
* codespell fixes * add whatsnew entry
1 parent 8230943 commit a5a4e2c

File tree

14 files changed

+19
-15
lines changed

14 files changed

+19
-15
lines changed

benchmarks/benchmarks/cperf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def setup(self, file_type, three_d, three_times):
5353
if three_d:
5454
create_kwargs["n_levels"] = 71
5555

56-
# Will re-use a file if already present.
56+
# Will reuse a file if already present.
5757
file_path = make_cubesphere_testfile(**create_kwargs)
5858

5959
else:

benchmarks/benchmarks/generate_data/stock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def _external(func_name_, temp_file_dir, **kwargs_):
3939
)
4040
if not REUSE_DATA or not save_path.is_file():
4141
# The xios functions take control of save location so need to move to
42-
# a more specific name that allows re-use.
42+
# a more specific name that allows reuse.
4343
actual_path = run_function_elsewhere(
4444
_external,
4545
func_name_=func_name,

benchmarks/benchmarks/load/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def time_realise(self, _, __, ___, ____) -> None:
6969

7070

7171
class STASHConstraint:
72-
# xyz sizes mimic LoadAndRealise to maximise file re-use.
72+
# xyz sizes mimic LoadAndRealise to maximise file reuse.
7373
params = [[(2, 2, 2), (1280, 960, 5), (2, 2, 1000)], ["FF", "PP"]]
7474
param_names = ["xyz", "file_format"]
7575

benchmarks/bm_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def _prep_data_gen_env() -> None:
8282
else:
8383
echo("Setting up the data generation environment ...")
8484
# Get Nox to build an environment for the `tests` session, but don't
85-
# run the session. Will re-use a cached environment if appropriate.
85+
# run the session. Will reuse a cached environment if appropriate.
8686
_subprocess_runner(
8787
[
8888
"nox",

docs/gallery_code/meteorology/plot_COP_1d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def main():
5454
)
5555

5656
# Generate area-weights array. As e1 and a1b are on the same grid we can
57-
# do this just once and re-use. This method requires bounds on lat/lon
57+
# do this just once and reuse. This method requires bounds on lat/lon
5858
# coords, so let's add some in sensible locations using the "guess_bounds"
5959
# method.
6060
e1.coord("latitude").guess_bounds()

docs/src/whatsnew/latest.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,9 @@ This document explains the changes made to Iris for this release
106106
#. `@fazledyn-or`_ replaced ``NotImplementedError`` with ``NotImplemented`` as
107107
a proper method call. (:pull:`5544`)
108108

109+
#. `@bjlittle`_ corrected various comment spelling mistakes detected by
110+
`codespell`_. (:pull:`5546`)
111+
109112

110113
.. comment
111114
Whatsnew author names (@github name) in alphabetical order. Note that,
@@ -120,4 +123,5 @@ This document explains the changes made to Iris for this release
120123
Whatsnew resources in alphabetical order:
121124
122125
.. _NEP29 Drop Schedule: https://numpy.org/neps/nep-0029-deprecation_policy.html#drop-schedule
126+
.. _codespell: https://github.com/codespell-project/codespell
123127

lib/iris/_deprecation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class IrisDeprecation(UserWarning):
1616
An Iris deprecation warning.
1717
1818
Note this subclasses UserWarning for backwards compatibility with Iris'
19-
original deprection warnings. Should subclass DeprecationWarning at the
19+
original deprecation warnings. Should subclass DeprecationWarning at the
2020
next major release.
2121
"""
2222

lib/iris/analysis/trajectory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ class UnstructuredNearestNeigbourRegridder:
734734
735735
"""
736736

737-
# TODO: cache the necessary bits of the operation so re-use can actually
737+
# TODO: cache the necessary bits of the operation so reuse can actually
738738
# be more efficient.
739739
def __init__(self, src_cube, target_grid_cube):
740740
"""
@@ -873,7 +873,7 @@ def __init__(self, src_cube, target_grid_cube):
873873
def __call__(self, src_cube):
874874
# Check the source cube X and Y coords match the original.
875875
# Note: for now, this is sufficient to ensure a valid trajectory
876-
# interpolation, but if in future we save + re-use the cache context
876+
# interpolation, but if in future we save and reuse the cache context
877877
# for the 'interpolate' call, we may need more checks here.
878878

879879
# Check the given cube against the original.

lib/iris/fileformats/netcdf/saver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,7 +1009,7 @@ def _add_inner_related_vars(
10091009
for element in sorted(
10101010
coordlike_elements, key=lambda element: element.name()
10111011
):
1012-
# Re-use, or create, the associated CF-netCDF variable.
1012+
# Reuse, or create, the associated CF-netCDF variable.
10131013
cf_name = self._name_coord_map.name(element)
10141014
if cf_name is None:
10151015
# Not already present : create it

lib/iris/pandas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def _add_iris_coord(cube, name, points, dim, calendar=None):
8383
Add a Coord or other dimensional metadata to a Cube from a Pandas index or columns array.
8484
"""
8585
# Most functionality has been abstracted to _get_dimensional_metadata,
86-
# allowing re-use in as_cube() and as_cubes().
86+
# allowing reuse in as_cube() and as_cubes().
8787
coord = _get_dimensional_metadata(name, points, calendar)
8888

8989
if coord.__class__ == DimCoord:

0 commit comments

Comments
 (0)