diff --git a/xarray/tests/test_interp.py b/xarray/tests/test_interp.py index 2ec222fb8cb..56822d20fd7 100644 --- a/xarray/tests/test_interp.py +++ b/xarray/tests/test_interp.py @@ -10,16 +10,9 @@ import xarray as xr from xarray.coding.cftimeindex import _parse_array_of_cftime_strings from xarray.core.types import InterpOptions -from xarray.tests import ( - assert_allclose, - assert_equal, - assert_identical, - has_dask, - has_scipy, - requires_cftime, - requires_dask, - requires_scipy, -) +from xarray.tests import (assert_allclose, assert_equal, assert_identical, + has_dask, has_scipy, requires_cftime, requires_dask, + requires_scipy) from xarray.tests.test_dataset import create_test_data try: @@ -634,15 +627,7 @@ def test_interp_like() -> None: ], ) @pytest.mark.filterwarnings("ignore:Converting non-nanosecond") -def test_datetime( - x_new: ( - DatetimeIndex - | ndarray[Any, dtype[datetime64]] - | list[str] - | Literal["2000-01-01T12:00"] - ), - expected: list[int] | list[float] | float, -) -> None: +def test_datetime(x_new, expected) -> None: da = xr.DataArray( np.arange(24), dims="time", @@ -824,7 +809,7 @@ def test_decompose(method: InterpOptions) -> None: ], ) def test_interpolate_chunk_1d( - method: InterpOptions, data_ndim: Any, interp_ndim: Any, nscalar: Any, chunked: bool + method: InterpOptions, data_ndim, interp_ndim, nscalar, chunked: bool ) -> None: """Interpolate nd array with multiple independent indexers @@ -959,11 +944,7 @@ def test_interp1d_bounds_error() -> None: ], ) def test_coord_attrs( - x: ( - float - | ndarray[Any, dtype[Any]] - | tuple[Literal[x], ndarray[Any, dtype[Any]], dict[str, str]] - ), + x, expect_same_attrs: bool, ) -> None: base_attrs = dict(foo="bar")