|
8 | 8 | from .internals import docstring |
9 | 9 |
|
10 | 10 | 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 | + ) |
14 | 19 | 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 |
21 | 22 |
|
22 | 23 | __all__ = [ |
23 | 24 | 'Aitoff', |
|
32 | 33 | 'SouthPolarLambertAzimuthalEqualArea', |
33 | 34 | ] |
34 | 35 |
|
| 36 | + |
35 | 37 | _reso_docstring = """ |
36 | 38 | The projection resolution. |
37 | 39 | """ |
@@ -66,7 +68,7 @@ def __init__( |
66 | 68 | """ |
67 | 69 | %(proj.init)s |
68 | 70 | """ |
69 | | - from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS |
| 71 | + from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe |
70 | 72 | if globe is None: |
71 | 73 | globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None) |
72 | 74 |
|
@@ -109,7 +111,7 @@ def __init__( |
109 | 111 | """ |
110 | 112 | %(proj.init)s |
111 | 113 | """ |
112 | | - from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS |
| 114 | + from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe |
113 | 115 | if globe is None: |
114 | 116 | globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None) |
115 | 117 |
|
@@ -153,7 +155,7 @@ def __init__( |
153 | 155 | """ |
154 | 156 | %(proj.init)s |
155 | 157 | """ |
156 | | - from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS |
| 158 | + from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe |
157 | 159 | if globe is None: |
158 | 160 | globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None) |
159 | 161 |
|
@@ -197,7 +199,7 @@ def __init__( |
197 | 199 | """ |
198 | 200 | %(proj.init)s |
199 | 201 | """ |
200 | | - from cartopy.crs import Globe, WGS84_SEMIMAJOR_AXIS |
| 202 | + from cartopy.crs import WGS84_SEMIMAJOR_AXIS, Globe |
201 | 203 | if globe is None: |
202 | 204 | globe = Globe(semimajor_axis=WGS84_SEMIMAJOR_AXIS, ellipse=None) |
203 | 205 |
|
|
0 commit comments