Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ exclude =
.eggs,
build,
compiled_krb,
sphinxext,
tools,
docs/iris/src/sphinxext/*,
tools/*,
#
# ignore auto-generated files
#
Expand Down
2 changes: 1 addition & 1 deletion docs/iris/gallery_tests/gallerytest_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
@contextlib.contextmanager
def add_gallery_to_path():
"""
Creates a context manager which can be used to add the iris gallery
Creates a context manager which can be used to add the iris gallery
to the PYTHONPATH. The gallery entries are only importable throughout the lifetime
of this context manager.

Expand Down
1 change: 0 additions & 1 deletion lib/iris/_concatenate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"""

from collections import defaultdict, namedtuple
from copy import deepcopy

import dask.array as da
import numpy as np
Expand Down
3 changes: 0 additions & 3 deletions lib/iris/analysis/_area_weighted.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
# See COPYING and COPYING.LESSER in the root of the repository for full
# licensing details.

import numpy as np

from iris.analysis._interpolation import get_xy_dim_coords, snapshot_grid
import iris
import iris.experimental.regrid as eregrid


Expand Down
3 changes: 1 addition & 2 deletions lib/iris/analysis/_regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,8 +426,7 @@ def _get_horizontal_coord(cube, axis):
if len(coords) != 1:
raise ValueError(
"Cube {!r} must contain a single 1D {} "
"coordinate.".format(cube.name()),
axis,
"coordinate.".format(cube.name(), axis)
)
return coords[0]

Expand Down
6 changes: 3 additions & 3 deletions lib/iris/fileformats/name_loaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ def load_NAMEIII_timeseries(filename):
for i, data_list in enumerate(data_lists):
data_list.append(float(vals[i + 1]))

data_arrays = [np.array(l) for l in data_lists]
data_arrays = [np.array(dl) for dl in data_lists]
time_array = np.array(time_list)
tdim = NAMECoord(name="time", dimension=0, values=time_array)

Expand Down Expand Up @@ -955,7 +955,7 @@ def load_NAMEII_timeseries(filename):
for i, data_list in enumerate(data_lists):
data_list.append(float(vals[i + 2]))

data_arrays = [np.array(l) for l in data_lists]
data_arrays = [np.array(dl) for dl in data_lists]
time_array = np.array(time_list)
tdim = NAMECoord(name="time", dimension=0, values=time_array)

Expand Down Expand Up @@ -1111,7 +1111,7 @@ def load_NAMEIII_version2(filename):
for i, data_list in enumerate(data_lists):
data_list.append(float(vals[i + datacol1]))

data_arrays = [np.array(l) for l in data_lists]
data_arrays = [np.array(dl) for dl in data_lists]

# Convert Z and T arrays into arrays of indices
zind = []
Expand Down
4 changes: 2 additions & 2 deletions lib/iris/fileformats/nimrod_load_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ def coord_system(field, handle_metadata_errors):
)
if any([is_missing(field, v) for v in crs_args]):
warnings.warn(
f"Coordinate Reference System is not completely defined. "
f"Plotting and reprojection may be impaired."
"Coordinate Reference System is not completely defined. "
"Plotting and reprojection may be impaired."
)
coord_sys = iris.coord_systems.TransverseMercator(
*crs_args, iris.coord_systems.GeogCS(**ellipsoid),
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/tests/unit/coords/test_CellMethod.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_mixture_default(self):
token = "air temperature" # includes space
coord = AuxCoord(1, long_name=token)
result = CellMethod(self.method, coords=[coord, token])
expected = "{}: unknown, unknown".format(self.method, token, token)
expected = "{}: unknown, unknown".format(self.method)
self.assertEqual(str(result), expected)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ def setUp(self):
# Patch the deferred loading that prevents attempted file access.
# This assumes that self.cf_bounds_var is defined in the test case.
def patched__getitem__(proxy_self, keys):
variable = None
for var in (self.cf_coord_var, self.cf_bounds_var):
if proxy_self.variable_name == var.cf_name:
return var[keys]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

from unittest import mock

import numpy as np

import iris
from iris.coord_systems import Mercator
from iris.fileformats._pyke_rules.compiled_krb.fc_rules_cf_fc import \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

from unittest import mock

import numpy as np

import iris
from iris.coord_systems import Stereographic
from iris.fileformats._pyke_rules.compiled_krb.fc_rules_cf_fc import \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

from unittest import mock

import numpy as np

from iris.fileformats._pyke_rules.compiled_krb.fc_rules_cf_fc import \
has_supported_mercator_parameters

Expand Down Expand Up @@ -135,5 +133,6 @@ def test_invalid_false_northing(self):
self.assertEqual(len(warns), 1)
self.assertRegex(str(warns[0]), 'False northing')


if __name__ == "__main__":
tests.main()
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

from unittest import mock

import numpy as np

from iris.coord_systems import Stereographic
from iris.fileformats._pyke_rules.compiled_krb.fc_rules_cf_fc import \
has_supported_stereographic_parameters

Expand Down