Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use isort's float-to-top #5695

Merged
merged 3 commits into from
Aug 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion properties/test_encode_decode.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
These ones pass, just as you'd hope!

"""
import pytest # isort:skip
import pytest

pytest.importorskip("hypothesis")
# isort: split

import hypothesis.extra.numpy as npst
import hypothesis.strategies as st
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ exclude=
[isort]
profile = black
skip_gitignore = true
force_to_top = true
float_to_top = true
default_section = THIRDPARTY
known_first_party = xarray

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