Skip to content

Commit b304aa0

Browse files
pre-commit-ci[bot]kmuehlbauer
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 274dde8 commit b304aa0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

xarray/coding/variables.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
import numpy as np
1010
import pandas as pd
1111

12-
from xarray.coding import times
1312
from xarray.core import dtypes, duck_array_ops, indexing
1413
from xarray.core.pycompat import is_duck_dask_array
1514
from xarray.core.variable import Variable
@@ -286,11 +285,11 @@ def decode(self, variable: Variable, name: T_Name = None):
286285
units = attrs.get("units", None)
287286
# try to cast to correct dtypes for data and fill_value
288287
# GH 7817
289-
if ((
288+
if (
290289
isinstance(units, str)
291290
and "since" in units
292-
and np.issubdtype(data.dtype, np.integer)) or np.issubdtype(data.dtype, np.datetime64)
293-
):
291+
and np.issubdtype(data.dtype, np.integer)
292+
) or np.issubdtype(data.dtype, np.datetime64):
294293
dtype, decoded_fill_value = data.dtype, np.datetime64("NaT").astype(
295294
data.dtype
296295
)

0 commit comments

Comments
 (0)