Use cbook methods for string checking · matplotlib/matplotlib@a4d1f4e · GitHub
Skip to content

Commit a4d1f4e

Browse files
committed
Use cbook methods for string checking
1 parent e9f1d7b commit a4d1f4e

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

lib/matplotlib/_mathtext.py

Lines changed: 1 addition & 1 deletion

lib/matplotlib/legend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
import numpy as np
3030

3131
import matplotlib as mpl
32-
from matplotlib import _api, _docstring, colors, offsetbox
32+
from matplotlib import _api, _docstring, cbook, colors, offsetbox
3333
from matplotlib.artist import Artist, allow_rasterization
3434
from matplotlib.cbook import silent_list
3535
from matplotlib.font_manager import FontProperties
@@ -622,7 +622,7 @@ def __init__(
622622
break
623623
except AttributeError:
624624
pass
625-
elif isinstance(labelcolor, str) and labelcolor == 'none':
625+
elif cbook._str_equal(labelcolor, 'none'):
626626
for text in self.texts:
627627
text.set_color(labelcolor)
628628
elif np.iterable(labelcolor):

lib/matplotlib/rcsetup.py

Lines changed: 2 additions & 2 deletions

0 commit comments

Comments
 (0)