From ff5ad1e0307125a97b5b045bcf941fd491173c2c Mon Sep 17 00:00:00 2001 From: Michael Niklas Date: Fri, 20 May 2022 14:52:34 +0200 Subject: [PATCH] format changes --- xarray/core/computation.py | 6 +----- xarray/tests/test_computation.py | 9 +++++++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/xarray/core/computation.py b/xarray/core/computation.py index b90421bfaeb..7099d85fe1d 100644 --- a/xarray/core/computation.py +++ b/xarray/core/computation.py @@ -1958,11 +1958,7 @@ def to_floatable(x: DataArray) -> DataArray: else type(x.data[0])(1970, 1, 1) ) return x.copy( - data=datetime_to_numeric( - x.data, - offset=offset, - datetime_unit="ns" - ), + data=datetime_to_numeric(x.data, offset=offset, datetime_unit="ns"), ) elif x.dtype.kind == "m": # timedeltas diff --git a/xarray/tests/test_computation.py b/xarray/tests/test_computation.py index 512e2673ea6..76304913d5d 100644 --- a/xarray/tests/test_computation.py +++ b/xarray/tests/test_computation.py @@ -2020,13 +2020,18 @@ def test_where_attrs() -> None: ), pytest.param( xr.DataArray( - xr.date_range('1970-01-01', freq='1S', periods=3, use_cftime=True), dims="x" + xr.date_range("1970-01-01", freq="1S", periods=3, use_cftime=True), + dims="x", ), xr.DataArray([0, 1], dims="degree", coords={"degree": [0, 1]}), xr.DataArray( [0, 1e9, 2e9], dims="x", - coords={"x": xr.date_range('1970-01-01', freq='1S', periods=3, use_cftime=True)}, + coords={ + "x": xr.date_range( + "1970-01-01", freq="1S", periods=3, use_cftime=True + ) + }, ), id="cftime", ),