Skip to content

Commit 2c34d49

Browse files
pylint
1 parent 3db15c5 commit 2c34d49

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

climada/util/earth_engine.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
import ee
3333

3434
LOGGER.info("Google Earth Engine API successfully imported.")
35-
ee_available = True
35+
EE_AVAILABLE = True
3636
except ImportError:
3737
LOGGER.error(
3838
"Google Earth Engine API not found. Please install it using 'pip install earthengine-api'."
3939
)
40-
ee_available = False
40+
EE_AVAILABLE = False
4141

42-
if not ee_available:
42+
if not EE_AVAILABLE:
4343
LOGGER.error(
4444
"Google Earth Engine API not found. Skipping the init of `earth_engine.py`."
4545
)
@@ -150,12 +150,11 @@ def get_region(geom):
150150
"""
151151
if isinstance(geom, ee.Geometry):
152152
return geom.getInfo()["coordinates"]
153-
elif isinstance(geom, (ee.Feature, ee.Image)):
153+
if isinstance(geom, (ee.Feature, ee.Image)):
154154
return geom.geometry().getInfo()["coordinates"]
155-
else:
156-
raise ValueError(
157-
"parameter must be one of `ee.Geometry`, `ee.Feature`, `ee.Image`"
158-
)
155+
raise ValueError(
156+
"parameter must be one of `ee.Geometry`, `ee.Feature`, `ee.Image`"
157+
)
159158

160159
def get_url(name, image, scale, region):
161160
"""It will open and download automatically a zip folder containing Geotiff data of 'image'.

0 commit comments

Comments
 (0)