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 .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ repos:
args: ['--django']

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.14.7"
rev: "v0.14.10"
hooks:
- id: ruff
types: [file, python]
args: [--fix]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: "25.11.0"
rev: "25.12.0"
hooks:
- id: black
types: [file, python]
Expand Down
12 changes: 6 additions & 6 deletions src/aeolus/coord.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,9 +1052,9 @@ def roll_cube_pm180(cube_in, add_shift=0, model=um):
coord_name = model.x # get the name of the longitude coordinate
xcoord = cube.coord(coord_name)
if (xcoord.points >= 0.0).all():
assert is_regular(xcoord), (
"Operation is only valid for a regularly spaced coordinate."
)
assert is_regular(
xcoord
), "Operation is only valid for a regularly spaced coordinate."
if _is_longitude_global(xcoord.points):
# Shift data symmetrically only when dealing with global cubes
cube.data = da.roll(
Expand All @@ -1079,9 +1079,9 @@ def roll_cube_pm180(cube_in, add_shift=0, model=um):
f"Incorrect {coord_name} values: "
f"from {xcoord.points.min()} to {xcoord.points.max()}"
)
assert ((xcoord.points >= -180.0) & (xcoord.points <= 180.0)).all(), (
msg
)
assert (
(xcoord.points >= -180.0) & (xcoord.points <= 180.0)
).all(), msg
return cube


Expand Down
Loading