Skip to content

Commit

Permalink
Workaround for python/mypy#1465
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Yeo <40734014+trexfeathers@users.noreply.github.com>
  • Loading branch information
bouweandela and trexfeathers authored Jun 26, 2024
1 parent 94ce438 commit ac4d44c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/iris/coords.py
Original file line number Diff line number Diff line change
Expand Up @@ -2704,7 +2704,12 @@ def _new_points_requirements(self, points):
emsg = "The {!r} {} points array must be strictly monotonic."
raise ValueError(emsg.format(self.name(), self.__class__.__name__))

@Coord._values.setter # type: ignore[attr-defined]
@property
def _values(self):
# Overridden just to allow .setter override.
return super()._values

@_values.setter
def _values(self, points):
# DimCoord always realises the points, to allow monotonicity checks.
# Ensure it is an actual array, and also make our own copy so that we
Expand Down

0 comments on commit ac4d44c

Please sign in to comment.