Skip to content

Commit c98c103

Browse files
committed
Use upper-case for constant name (Fix C0103)
1 parent 5deebf8 commit c98c103

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

pygmt/datasets/tile_map.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
try:
77
import contextily
88

9-
_has_contextily = True
9+
_HAS_CONTEXTILY = True
1010
except ImportError:
11-
_has_contextily = False
11+
_HAS_CONTEXTILY = False
1212

1313
import numpy as np
1414
import xarray as xr
@@ -110,7 +110,7 @@ def load_tile_map(region, zoom="auto", source=None, lonlat=True, wait=0, max_ret
110110
* x (x) float64 -2.004e+07 -1.996e+07 ... 1.996e+07 2.004e+07
111111
"""
112112
# pylint: disable=too-many-locals
113-
if not _has_contextily:
113+
if not _HAS_CONTEXTILY:
114114
raise ImportError(
115115
"Package `contextily` is required to be installed to use this function. "
116116
"Please use `python -m pip install contextily` or "

pygmt/figure.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
try:
1010
import IPython
1111

12-
_has_ipython = True
12+
_HAS_IPYTHON = True
1313
except ImportError:
14-
_has_ipython = False
14+
_HAS_IPYTHON = False
1515

1616

1717
from pygmt.clib import Session
@@ -35,7 +35,7 @@
3535
}
3636

3737
# Show figures in Jupyter notebooks if available
38-
if _has_ipython:
38+
if _HAS_IPYTHON:
3939
get_ipython = IPython.get_ipython() # pylint: disable=invalid-name
4040
if get_ipython and "IPKernelApp" in get_ipython.config: # Jupyter Notebook enabled
4141
SHOW_CONFIG["method"] = "notebook"
@@ -454,7 +454,7 @@ def show(self, dpi=300, width=500, method=None, waiting=0.5, **kwargs):
454454
)
455455

456456
if method == "notebook":
457-
if not _has_ipython:
457+
if not _HAS_IPYTHON:
458458
raise GMTError(
459459
"Notebook display is selected, but IPython is not available. "
460460
"Make sure you have IPython installed, "

0 commit comments

Comments
 (0)