Skip to content

Commit

Permalink
style: reformat with new ruff version
Browse files Browse the repository at this point in the history
  • Loading branch information
mdtanker committed Apr 26, 2024
1 parent dde66fd commit a7e9e8f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/polartoolkit/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -2176,9 +2176,11 @@ def preprocessing(fname: str, action: str, _pooch2: typing.Any) -> str:
# Only recalculate if new download or the processed file doesn't exist yet
if action in ("download", "update") or not fname_processed.exists():
# load data
with xr.open_dataarray(tiff_file).squeeze().drop_vars(
["band", "spatial_ref"]
) as grid:
with (
xr.open_dataarray(tiff_file)
.squeeze()
.drop_vars(["band", "spatial_ref"]) as grid
):
ds = grid.to_dataset(name="surface")

# Save to disk
Expand Down
1 change: 1 addition & 0 deletions src/polartoolkit/regions.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Bounding regions for commonly plotted Antarctic regions. In Polar Stereographic
Projection (EPSG:3031). The format is (East, West, North, South), in meters.
"""

from __future__ import annotations

import typing
Expand Down
1 change: 1 addition & 0 deletions tests/test_fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ def test_():
expected =
assert utils.get_grid_info(grid) == expected
"""

from __future__ import annotations

import os
Expand Down
1 change: 1 addition & 0 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"""
Tests for utils module.
"""

# %%
from __future__ import annotations

Expand Down

0 comments on commit a7e9e8f

Please sign in to comment.