File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1717from collections import namedtuple
1818from collections .abc import Sequence
1919from importlib import resources
20- from typing import Literal , NamedTuple , overload
20+ from typing import Literal , NamedTuple , cast , overload
2121
2222import matplotlib
2323from matplotlib .colors import LinearSegmentedColormap , ListedColormap
@@ -294,7 +294,9 @@ def __getitem__(
294294 def __getitem__ (self , key : str ) -> LinearSegmentedColormap | ListedColormap : ...
295295
296296 def __getitem__ (self , key : str ) -> LinearSegmentedColormap | ListedColormap :
297- return super ().__getitem__ (key ).copy ()
297+ return cast (
298+ LinearSegmentedColormap | ListedColormap , super ().__getitem__ (key ).copy ()
299+ )
298300
299301
300302colormaps = ColormapMapping ()
You can’t perform that action at this time.
0 commit comments