We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22dae3d commit 1002853Copy full SHA for 1002853
1 file changed
proplot/styletools.py
@@ -2152,13 +2152,12 @@ def Colormap(
2152
# TODO: Document how 'listmode' also affects loaded files
2153
if isinstance(cmap, str):
2154
if '.' in cmap:
2155
- isfile = os.path.isfile(os.path.expanduser(cmap))
2156
- if isfile:
+ if os.path.isfile(os.path.expanduser(cmap)):
2157
if listmode == 'listed':
2158
cmap = ListedColormap.from_file(cmap)
2159
else:
2160
cmap = LinearSegmentedColormap.from_file(cmap)
2161
- if not isfile or not cmap:
+ else:
2162
raise FileNotFoundError(
2163
f'Colormap or cycle file {cmap!r} not found '
2164
'or failed to load.'
0 commit comments