Skip to content

Commit cfacdb3

Browse files
authored
Merge pull request matplotlib#22643 from anntzer/ec
Suppress exception chaining in colormap lookup.
2 parents 8f4e7dd + aa21ed8 commit cfacdb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/cm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def __getitem__(self, item):
130130
try:
131131
return self._cmaps[item].copy()
132132
except KeyError:
133-
raise KeyError(f"{item!r} is not a known colormap name")
133+
raise KeyError(f"{item!r} is not a known colormap name") from None
134134

135135
def __iter__(self):
136136
return iter(self._cmaps)

0 commit comments

Comments
 (0)