Skip to content

Commit

Permalink
Run ruff formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
tomvothecoder committed Oct 2, 2024
1 parent 2401905 commit c65dc22
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 2 deletions.
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Unit test package for xcdat."""

from xarray.core.options import set_options
from xarray.tests import requires_dask # noqa: F401

Expand Down
1 change: 1 addition & 0 deletions tests/fixtures.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""This module stores reusable test fixtures."""

from typing import Literal

import cftime
Expand Down
1 change: 1 addition & 0 deletions xcdat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Top-level package for xcdat."""

from xcdat.axis import ( # noqa: F401
center_times,
get_dim_coords,
Expand Down
1 change: 1 addition & 0 deletions xcdat/_logger.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Logger module for setting up a logger."""

import logging
import logging.handlers

Expand Down
5 changes: 4 additions & 1 deletion xcdat/regridder/grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,10 @@ def create_zonal_grid(grid: xr.Dataset) -> xr.Dataset:
# Ignore `Argument 1 to "create_grid" has incompatible type
# "Union[Dataset, DataArray]"; expected "Union[ndarray[Any, Any], DataArray]"
# mypy(error)` because this arg is validated to be a DataArray beforehand.
return create_grid(x=create_axis("lon", out_lon_data, bounds=lon_bnds), y=create_axis("lat", lat, bounds=lat_bnds)) # type: ignore
return create_grid(
x=create_axis("lon", out_lon_data, bounds=lon_bnds),
y=create_axis("lat", lat, bounds=lat_bnds), # type: ignore
)


def create_grid(
Expand Down
2 changes: 1 addition & 1 deletion xcdat/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def _has_module(modname: str) -> bool: # pragma: no cover


def _if_multidim_dask_array_then_load(
obj: Union[xr.DataArray, xr.Dataset]
obj: Union[xr.DataArray, xr.Dataset],
) -> Optional[Union[xr.DataArray, xr.Dataset]]:
"""
If the underlying array for an xr.DataArray or xr.Dataset is a
Expand Down

0 comments on commit c65dc22

Please sign in to comment.