diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9cb48130..56ced538 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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] diff --git a/src/aeolus/coord.py b/src/aeolus/coord.py index 5e188e08..91980b68 100644 --- a/src/aeolus/coord.py +++ b/src/aeolus/coord.py @@ -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( @@ -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