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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ExampleClass(object):
class ExampleClass:
"""
Class Summary

Expand Down
6 changes: 3 additions & 3 deletions lib/iris/_concatenate.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def _none_sort(item):
return concatenated_cubes


class _CubeSignature(object):
class _CubeSignature:
"""
Template for identifying a specific type of :class:`iris.cube.Cube` based
on its metadata, coordinates and cell_measures.
Expand Down Expand Up @@ -460,7 +460,7 @@ def match(self, other, error_on_mismatch):
return match


class _CoordSignature(object):
class _CoordSignature:
"""
Template for identifying a specific type of :class:`iris.cube.Cube` based
on its coordinates.
Expand Down Expand Up @@ -579,7 +579,7 @@ def _calculate_extents(self):
self.dim_extents.append(_CoordExtent(points, bounds))


class _ProtoCube(object):
class _ProtoCube:
"""
Framework for concatenating multiple source-cubes over one
common dimension.
Expand Down
6 changes: 3 additions & 3 deletions lib/iris/_constraints.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import iris.exceptions


class Constraint(object):
class Constraint:
"""
Constraints are the mechanism by which cubes can be pattern matched and
filtered according to specific criteria.
Expand Down Expand Up @@ -199,7 +199,7 @@ def _CIM_extract(self, cube):
self.rhs._CIM_extract(cube))


class _CoordConstraint(object):
class _CoordConstraint:
"""Represents the atomic elements which might build up a Constraint."""
def __init__(self, coord_name, coord_thing):
"""
Expand Down Expand Up @@ -280,7 +280,7 @@ def call_func(c):
return cube_cim


class _ColumnIndexManager(object):
class _ColumnIndexManager:
"""
A class to represent column aligned slices which can be operated on
using ``&``, ``|`` or ``^``.
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/_cube_coord_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def update(self, other, **kwargs):
dict.update(self, other, **kwargs)


class CFVariableMixin(object):
class CFVariableMixin:

_DEFAULT_NAME = 'unknown' # the name default string

Expand Down
2 changes: 1 addition & 1 deletion lib/iris/_data_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from iris.util import array_equal


class DataManager(object):
class DataManager:
"""
Provides a well defined API for management of real or lazy data.

Expand Down
2 changes: 1 addition & 1 deletion lib/iris/_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1054,7 +1054,7 @@ def derive_space(groups, relation_matrix, positions, function_matrix=None):
return space


class ProtoCube(object):
class ProtoCube:
"""
Framework for merging source-cubes into one or more higher
dimensional cubes.
Expand Down
16 changes: 8 additions & 8 deletions lib/iris/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
'AreaWeighted', 'Nearest', 'UnstructuredNearest')


class _CoordGroup(object):
class _CoordGroup:
"""
Represents a list of coordinates, one for each given cube. Which can be
operated on conveniently.
Expand Down Expand Up @@ -349,7 +349,7 @@ def no_data_dim_fn(cube, coord):
return result


class _Aggregator(object):
class _Aggregator:
"""
The :class:`_Aggregator` base class provides common aggregation
functionality.
Expand Down Expand Up @@ -1823,7 +1823,7 @@ def interp_order(length):
"""


class _Groupby(object):
class _Groupby:
"""
Convenience class to determine group slices over one or more group-by
coordinates.
Expand Down Expand Up @@ -2149,7 +2149,7 @@ def clear_phenomenon_identity(cube):
#
###############################################################################

class Linear(object):
class Linear:
"""
This class describes the linear interpolation and regridding scheme for
interpolating or regridding over one or more orthogonal coordinates,
Expand Down Expand Up @@ -2272,7 +2272,7 @@ def regridder(self, src_grid, target_grid):
self._normalised_extrapolation_mode())


class AreaWeighted(object):
class AreaWeighted:
"""
This class describes an area-weighted regridding scheme for regridding
between 'ordinary' horizontal grids with separated X and Y coordinates in a
Expand Down Expand Up @@ -2342,7 +2342,7 @@ def regridder(self, src_grid_cube, target_grid_cube):
mdtol=self.mdtol)


class Nearest(object):
class Nearest:
"""
This class describes the nearest-neighbour interpolation and regridding
scheme for interpolating or regridding over one or more orthogonal
Expand Down Expand Up @@ -2455,7 +2455,7 @@ def regridder(self, src_grid, target_grid):
self.extrapolation_mode)


class UnstructuredNearest(object):
class UnstructuredNearest:
"""
This is a nearest-neighbour regridding scheme for regridding data whose
horizontal (X- and Y-axis) coordinates are mapped to the *same* dimensions,
Expand Down Expand Up @@ -2546,7 +2546,7 @@ def regridder(self, src_cube, target_grid):
return UnstructuredNearestNeigbourRegridder(src_cube, target_grid)


class PointInCell(object):
class PointInCell:
"""
This class describes the point-in-cell regridding scheme for use
typically with :meth:`iris.cube.Cube.regrid()`.
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/analysis/_area_weighted.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
import iris.experimental.regrid as eregrid


class AreaWeightedRegridder(object):
class AreaWeightedRegridder:
"""
This class provides support for performing area-weighted regridding.

Expand Down
2 changes: 1 addition & 1 deletion lib/iris/analysis/_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def snapshot_grid(cube):
return x.copy(), y.copy()


class RectilinearInterpolator(object):
class RectilinearInterpolator:
"""
This class provides support for performing nearest-neighbour or
linear interpolation over one or more orthogonal dimensions.
Expand Down
4 changes: 2 additions & 2 deletions lib/iris/analysis/_regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def _regrid_weighted_curvilinear_to_rectilinear__perform(
return cube


class CurvilinearRegridder(object):
class CurvilinearRegridder:
"""
This class provides support for performing point-in-cell regridding
between a curvilinear source grid and a rectilinear target grid.
Expand Down Expand Up @@ -447,7 +447,7 @@ def __call__(self, src):
return result


class RectilinearRegridder(object):
class RectilinearRegridder:
"""
This class provides support for performing nearest-neighbour or
linear regridding between source and target grids.
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/analysis/_scipy_interpolate.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def _ndim_coords_from_arrays(points, ndim=None):

# source: https://github.com/scipy/scipy/blob/b94a5d5ccc08dddbc88453477ff2625\
# 9aeaafb32/scipy/interpolate/interpolate.py#L1400
class _RegularGridInterpolator(object):
class _RegularGridInterpolator:

"""
Interpolation on a regular grid in arbitrary dimensions
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/analysis/maths.py
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ def _math_op_common(cube, operation_function, new_unit, new_dtype=None,
return new_cube


class IFunc(object):
class IFunc:
"""
:class:`IFunc` class for functions that can be applied to an iris cube.
"""
Expand Down
6 changes: 3 additions & 3 deletions lib/iris/analysis/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from iris.util import _meshgrid


class _Segment(object):
class _Segment:
"""A single trajectory line segment: Two points, as described in the
Trajectory class."""
def __init__(self, p0, p1):
Expand All @@ -41,7 +41,7 @@ def __init__(self, p0, p1):
self.length = math.sqrt(squares)


class Trajectory(object):
class Trajectory:
"""A series of given waypoints with pre-calculated sample points."""

def __init__(self, waypoints, sample_count=10):
Expand Down Expand Up @@ -656,7 +656,7 @@ def _nearest_neighbour_indices_ndcoords(cube, sample_points, cache=None):
return result


class UnstructuredNearestNeigbourRegridder(object):
class UnstructuredNearestNeigbourRegridder:
"""
Encapsulate the operation of :meth:`iris.analysis.trajectory.interpolate`
with given source and target grids.
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def get_dir_option(section, option, default=None):
# Runtime options


class NetCDF(object):
class NetCDF:
"""Control Iris NetCDF options."""

def __init__(self, conventions_override=None):
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/coord_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import cartopy.crs as ccrs


class CoordSystem(object, metaclass=ABCMeta):
class CoordSystem(metaclass=ABCMeta):
"""
Abstract base class for coordinate systems.

Expand Down
6 changes: 3 additions & 3 deletions lib/iris/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def name(self, default='unknown'):
XML_NAMESPACE_URI = "urn:x-iris:cubeml-0.2"


class _CubeFilter(object):
class _CubeFilter:
"""
A constraint, paired with a list of cubes matching that constraint.

Expand Down Expand Up @@ -117,7 +117,7 @@ def merged(self, unique=False):
return _CubeFilter(self.constraint, self.cubes.merge(unique))


class _CubeFilterCollection(object):
class _CubeFilterCollection:
"""
A list of _CubeFilter instances.

Expand Down Expand Up @@ -3963,7 +3963,7 @@ def regrid(self, grid, scheme):
return regridder(self)


class ClassDict(MutableMapping, object):
class ClassDict(MutableMapping):
"""
A mapping that stores objects keyed on their superclasses and their names.

Expand Down
8 changes: 4 additions & 4 deletions lib/iris/experimental/regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -823,7 +823,7 @@ def regrid_weighted_curvilinear_to_rectilinear(src_cube, weights, grid_cube):
return result


class PointInCell(object):
class PointInCell:
"""
This class describes the point-in-cell regridding scheme for use
typically with :meth:`iris.cube.Cube.regrid()`.
Expand Down Expand Up @@ -857,7 +857,7 @@ def __init__(self, weights=None):
'"iris.analysis.PointInCell".')


class _ProjectedUnstructuredRegridder(object):
class _ProjectedUnstructuredRegridder:
"""
This class provides regridding that uses scipy.interpolate.griddata.

Expand Down Expand Up @@ -1163,7 +1163,7 @@ def __call__(self, src_cube):
return new_cube


class ProjectedUnstructuredLinear(object):
class ProjectedUnstructuredLinear:
"""
This class describes the linear regridding scheme which uses the
scipy.interpolate.griddata to regrid unstructured data on to a grid.
Expand Down Expand Up @@ -1220,7 +1220,7 @@ def regridder(self, src_cube, target_grid):
'linear', self.projection)


class ProjectedUnstructuredNearest(object):
class ProjectedUnstructuredNearest:
"""
This class describes the nearest regridding scheme which uses the
scipy.interpolate.griddata to regrid unstructured data on to a grid.
Expand Down
4 changes: 2 additions & 2 deletions lib/iris/experimental/representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import re


class CubeRepresentation(object):
class CubeRepresentation:
"""
Produce representations of a :class:`~iris.cube.Cube`.

Expand Down Expand Up @@ -327,7 +327,7 @@ def repr_html(self):
content=content)


class CubeListRepresentation(object):
class CubeListRepresentation:
_template = """
<style>
.accordion-{uid} {{
Expand Down
6 changes: 3 additions & 3 deletions lib/iris/fileformats/_ff.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
REAL_POLE_LON = 5


class Grid(object):
class Grid:
"""
An abstract class representing the default/file-level grid
definition for a FieldsFile.
Expand Down Expand Up @@ -286,7 +286,7 @@ def _y_vectors(self):
return y_p, y_v


class FFHeader(object):
class FFHeader:
"""
A class to represent the FIXED_LENGTH_HEADER section of a FieldsFile.

Expand Down Expand Up @@ -417,7 +417,7 @@ def grid(self):
return grid


class FF2PP(object):
class FF2PP:
"""
A class to extract the individual PPFields from within a FieldsFile.

Expand Down
2 changes: 1 addition & 1 deletion lib/iris/fileformats/_structured_array_identification.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def from_array(cls, arr):
return structure


class GroupStructure(object):
class GroupStructure:
"""
The GroupStructure class represents a collection of array structures along
with additional information such as the length of the arrays and the array
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/fileformats/abf.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"jul": 7, "aug": 8, "sep": 9, "oct": 10, "nov": 11, "dec": 12}


class ABFField(object):
class ABFField:
"""
A data field from an ABF (or ABL) file.

Expand Down
Loading