Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd6cf8e commit d58a84aCopy full SHA for d58a84a
lib/matplotlib/rcsetup.py
@@ -227,16 +227,16 @@ def __call__(self, s):
227
228
def validate_color(s):
229
'return a valid color arg'
230
- try:
231
- if s.lower() == 'none':
232
- return 'None'
233
- except AttributeError:
234
- pass
+ if s in (None, 'none', 'None'):
+ return None
+
235
if is_color_like(s):
236
return s
237
stmp = '#' + s
238
if is_color_like(stmp):
239
return stmp
240
# If it is still valid, it must be a tuple.
241
colorarg = s
242
msg = ''
0 commit comments