Skip to content

Commit c085461

Browse files
committed
.
1 parent ce607b5 commit c085461

File tree

3 files changed

+18
-16
lines changed

3 files changed

+18
-16
lines changed

properties/test_encode_decode.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"""
77
import pytest # isort:skip
88

9-
pytest.importorskip("hypothesis")
10-
9+
pytest.importorskip("hypothesis") # isort:split
1110
import hypothesis.extra.numpy as npst
1211
import hypothesis.strategies as st
1312
from hypothesis import given
1413

1514
import xarray as xr
1615

16+
1717
an_array = npst.arrays(
1818
dtype=st.one_of(
1919
npst.unsigned_integer_dtypes(), npst.integer_dtypes(), npst.floating_dtypes()

xarray/core/parallel.py

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,3 @@
1-
try:
2-
import dask
3-
import dask.array
4-
from dask.array.utils import meta_from_array
5-
from dask.highlevelgraph import HighLevelGraph
6-
7-
except ImportError:
8-
pass
9-
101
import collections
112
import itertools
123
import operator
@@ -31,6 +22,16 @@
3122
from .dataarray import DataArray
3223
from .dataset import Dataset
3324

25+
try:
26+
import dask
27+
import dask.array
28+
from dask.array.utils import meta_from_array
29+
from dask.highlevelgraph import HighLevelGraph
30+
31+
except ImportError:
32+
pass
33+
34+
3435
T_DSorDA = TypeVar("T_DSorDA", DataArray, Dataset)
3536

3637

xarray/tests/test_units.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@
55
import pandas as pd
66
import pytest
77

8-
try:
9-
import matplotlib.pyplot as plt
10-
except ImportError:
11-
pass
12-
138
import xarray as xr
149
from xarray.core import dtypes, duck_array_ops
1510

@@ -23,6 +18,12 @@
2318
from .test_plot import PlotTestCase
2419
from .test_variable import _PAD_XR_NP_ARGS
2520

21+
try:
22+
import matplotlib.pyplot as plt
23+
except ImportError:
24+
pass
25+
26+
2627
pint = pytest.importorskip("pint")
2728
DimensionalityError = pint.errors.DimensionalityError
2829

0 commit comments

Comments
 (0)