Skip to content

Commit 13ae9f4

Browse files
committed
Add isort
1 parent ea41e09 commit 13ae9f4

File tree

10 files changed

+28
-24
lines changed

10 files changed

+28
-24
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ jobs:
4242
- name: Check style
4343
run: |
4444
black --check xarray_leaflet tests
45+
isort --check --profile=black xarray_leaflet tests
4546
flake8 xarray_leaflet tests
4647
# mypy xarray_leaflet
4748

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ test =
3838
mypy
3939
flake8
4040
black
41+
isort
4142
pytest
4243

4344
[options.data_files]

tests/test_vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
import geopandas as gpd
55
import mercantile
66
from shapely.geometry import box
7+
78
from xarray_leaflet.vector import Zvect
89

910
from .utils import save_fig
1011

11-
1212
HEIGHT = WIDTH = 256
1313

1414

tests/utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import matplotlib.pyplot as plt
44

5-
65
RESULTS = Path(__file__).parent / "results"
76
RESULTS.mkdir(exist_ok=True)
87
EXPECTED = Path(__file__).parent / "expected"

xarray_leaflet/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
__version__ = "0.1.15"
22

3-
from .xarray_leaflet import LeafletMap # noqa
3+
from .server_extension import _jupyter_nbextension_paths # noqa
44
from .server_extension import _jupyter_server_extension_paths # noqa
55
from .server_extension import _load_jupyter_server_extension
6-
from .server_extension import _jupyter_nbextension_paths # noqa
7-
6+
from .xarray_leaflet import LeafletMap # noqa
87

98
load_jupyter_server_extension = _load_jupyter_server_extension

xarray_leaflet/handler.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import os
22
from asyncio import sleep
3-
from jupyter_server.base.handlers import JupyterHandler
3+
44
import tornado
5+
from jupyter_server.base.handlers import JupyterHandler
56

67

78
class XarrayLeafletHandler(JupyterHandler):

xarray_leaflet/server_extension.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
from .handler import XarrayLeafletHandler
21
from notebook.utils import url_path_join
32

3+
from .handler import XarrayLeafletHandler
4+
45

56
def _load_jupyter_server_extension(serverapp):
67
"""

xarray_leaflet/transform.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import warnings
2+
23
import numpy as np
34
import xarray.core.rolling
45

xarray_leaflet/utils.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import os
21
import asyncio
3-
import numpy as np
4-
from PIL import Image
2+
import os
3+
54
import mercantile
5+
import numpy as np
66
from affine import Affine
7+
from PIL import Image
78

89

910
def reproject_custom(

xarray_leaflet/xarray_leaflet.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
import os
21
import asyncio
2+
import os
33
import tempfile
44
from typing import Optional
55

6-
import xarray as xr
76
import geopandas as gpd
87
import matplotlib as mpl
9-
import numpy as np
108
import mercantile
11-
from matplotlib import pyplot as plt
12-
from ipyleaflet import LocalTileLayer, WidgetControl, DrawControl
9+
import numpy as np
10+
import xarray as xr
11+
from ipyleaflet import DrawControl, LocalTileLayer, WidgetControl
1312
from ipyspin import Spinner
14-
from ipywidgets import Output
13+
from IPython.display import Image, display
1514
from ipyurl import Url
16-
from IPython.display import display, Image
17-
from traitlets import HasTraits, Bool, observe
15+
from ipywidgets import Output
16+
from matplotlib import pyplot as plt
1817
from rasterio.warp import Resampling
18+
from traitlets import Bool, HasTraits, observe
1919

20-
from .vector import Zvect
21-
from .transform import passthrough, normalize, coarsen
20+
from .transform import coarsen, normalize, passthrough
21+
from .utils import debug # noqa
2222
from .utils import (
23-
reproject_custom,
24-
reproject_not_custom,
25-
write_image,
2623
get_bbox_tiles,
2724
get_transform,
25+
reproject_custom,
26+
reproject_not_custom,
2827
wait_for_change,
28+
write_image,
2929
)
30-
from .utils import debug # noqa
30+
from .vector import Zvect
3131

3232

3333
@xr.register_dataarray_accessor("leaflet")

0 commit comments

Comments
 (0)