Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty committed Aug 12, 2021
1 parent ce607b5 commit c085461
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 16 deletions.
4 changes: 2 additions & 2 deletions properties/test_encode_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
"""
import pytest # isort:skip

pytest.importorskip("hypothesis")

pytest.importorskip("hypothesis") # isort:split
import hypothesis.extra.numpy as npst
import hypothesis.strategies as st
from hypothesis import given

import xarray as xr


an_array = npst.arrays(
dtype=st.one_of(
npst.unsigned_integer_dtypes(), npst.integer_dtypes(), npst.floating_dtypes()
Expand Down
19 changes: 10 additions & 9 deletions xarray/core/parallel.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
try:
import dask
import dask.array
from dask.array.utils import meta_from_array
from dask.highlevelgraph import HighLevelGraph

except ImportError:
pass

import collections
import itertools
import operator
Expand All @@ -31,6 +22,16 @@
from .dataarray import DataArray
from .dataset import Dataset

try:
import dask
import dask.array
from dask.array.utils import meta_from_array
from dask.highlevelgraph import HighLevelGraph

except ImportError:
pass


T_DSorDA = TypeVar("T_DSorDA", DataArray, Dataset)


Expand Down
11 changes: 6 additions & 5 deletions xarray/tests/test_units.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
import pandas as pd
import pytest

try:
import matplotlib.pyplot as plt
except ImportError:
pass

import xarray as xr
from xarray.core import dtypes, duck_array_ops

Expand All @@ -23,6 +18,12 @@
from .test_plot import PlotTestCase
from .test_variable import _PAD_XR_NP_ARGS

try:
import matplotlib.pyplot as plt
except ImportError:
pass


pint = pytest.importorskip("pint")
DimensionalityError = pint.errors.DimensionalityError

Expand Down

0 comments on commit c085461

Please sign in to comment.