Skip to content

Commit

Permalink
Fix import statements to satisfy isort
Browse files Browse the repository at this point in the history
  • Loading branch information
lukelbd committed Feb 23, 2022
1 parent 275bf30 commit 154f203
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
28 changes: 15 additions & 13 deletions proplot/proj.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@
from .internals import docstring

try:
from cartopy.crs import _WarpedRectangularProjection
from cartopy.crs import AzimuthalEquidistant, Gnomonic, LambertAzimuthalEqualArea
from cartopy.crs import NorthPolarStereo, SouthPolarStereo # noqa: F401 (geo.py)
from cartopy.crs import ( # stereo projections needed in geo.py
AzimuthalEquidistant,
Gnomonic,
LambertAzimuthalEqualArea,
NorthPolarStereo,
SouthPolarStereo,
_WarpedRectangularProjection,
)
except ModuleNotFoundError:
_WarpedRectangularProjection = object
AzimuthalEquidistant = object
Gnomonic = object
LambertAzimuthalEqualArea = object
NorthPolarStereo = object
SouthPolarStereo = object
AzimuthalEquidistant = Gnomonic = LambertAzimuthalEqualArea = object
_WarpedRectangularProjection = NorthPolarStereo = SouthPolarStereo = object

__all__ = [
'Aitoff',
Expand All @@ -32,6 +33,7 @@
'SouthPolarLambertAzimuthalEqualArea',
]


_reso_docstring = """
The projection resolution.
"""
Expand Down Expand Up @@ -66,7 +68,7 @@ def __init__(
"""
%(proj.init)s
"""
from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS
from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe
if globe is None:
globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None)

Expand Down Expand Up @@ -109,7 +111,7 @@ def __init__(
"""
%(proj.init)s
"""
from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS
from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe
if globe is None:
globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None)

Expand Down Expand Up @@ -153,7 +155,7 @@ def __init__(
"""
%(proj.init)s
"""
from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS
from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe
if globe is None:
globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None)

Expand Down Expand Up @@ -197,7 +199,7 @@ def __init__(
"""
%(proj.init)s
"""
from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS
from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe
if globe is None:
globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None)

Expand Down
6 changes: 4 additions & 2 deletions proplot/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
try:
import cartopy.crs as ccrs
from cartopy.mpl.ticker import (
_PlateCarreeFormatter, LatitudeFormatter, LongitudeFormatter
LatitudeFormatter,
LongitudeFormatter,
_PlateCarreeFormatter,
)
except ModuleNotFoundError:
ccrs = None
_PlateCarreeFormatter = LatitudeFormatter = LongitudeFormatter = object
LatitudeFormatter = LongitudeFormatter = _PlateCarreeFormatter = object

__all__ = [
'IndexLocator',
Expand Down

0 comments on commit 154f203

Please sign in to comment.