Skip to content

Commit 154f203

Browse files
committed
Fix import statements to satisfy isort
1 parent 275bf30 commit 154f203

File tree

2 files changed

+19
-15
lines changed

2 files changed

+19
-15
lines changed

proplot/proj.py

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,17 @@
88
from .internals import docstring
99

1010
try:
11-
from cartopy.crs import _WarpedRectangularProjection
12-
from cartopy.crs import AzimuthalEquidistant, Gnomonic, LambertAzimuthalEqualArea
13-
from cartopy.crs import NorthPolarStereo, SouthPolarStereo # noqa: F401 (geo.py)
11+
from cartopy.crs import ( # stereo projections needed in geo.py
12+
AzimuthalEquidistant,
13+
Gnomonic,
14+
LambertAzimuthalEqualArea,
15+
NorthPolarStereo,
16+
SouthPolarStereo,
17+
_WarpedRectangularProjection,
18+
)
1419
except ModuleNotFoundError:
15-
_WarpedRectangularProjection = object
16-
AzimuthalEquidistant = object
17-
Gnomonic = object
18-
LambertAzimuthalEqualArea = object
19-
NorthPolarStereo = object
20-
SouthPolarStereo = object
20+
AzimuthalEquidistant = Gnomonic = LambertAzimuthalEqualArea = object
21+
_WarpedRectangularProjection = NorthPolarStereo = SouthPolarStereo = object
2122

2223
__all__ = [
2324
'Aitoff',
@@ -32,6 +33,7 @@
3233
'SouthPolarLambertAzimuthalEqualArea',
3334
]
3435

36+
3537
_reso_docstring = """
3638
The projection resolution.
3739
"""
@@ -66,7 +68,7 @@ def __init__(
6668
"""
6769
%(proj.init)s
6870
"""
69-
from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS
71+
from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe
7072
if globe is None:
7173
globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None)
7274

@@ -109,7 +111,7 @@ def __init__(
109111
"""
110112
%(proj.init)s
111113
"""
112-
from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS
114+
from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe
113115
if globe is None:
114116
globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None)
115117

@@ -153,7 +155,7 @@ def __init__(
153155
"""
154156
%(proj.init)s
155157
"""
156-
from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS
158+
from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe
157159
if globe is None:
158160
globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None)
159161

@@ -197,7 +199,7 @@ def __init__(
197199
"""
198200
%(proj.init)s
199201
"""
200-
from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS
202+
from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe
201203
if globe is None:
202204
globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None)
203205

proplot/ticker.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
try:
1818
import cartopy.crs as ccrs
1919
from cartopy.mpl.ticker import (
20-
_PlateCarreeFormatter, LatitudeFormatter, LongitudeFormatter
20+
LatitudeFormatter,
21+
LongitudeFormatter,
22+
_PlateCarreeFormatter,
2123
)
2224
except ModuleNotFoundError:
2325
ccrs = None
24-
_PlateCarreeFormatter = LatitudeFormatter = LongitudeFormatter = object
26+
LatitudeFormatter = LongitudeFormatter = _PlateCarreeFormatter = object
2527

2628
__all__ = [
2729
'IndexLocator',

0 commit comments

Comments
 (0)