We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 296bc4f + b4ee5db commit 8407ffcCopy full SHA for 8407ffc
lib/matplotlib/rcsetup.py
@@ -95,8 +95,13 @@ def f(s):
95
return [scalar_validator(v) for v in s
96
if not isinstance(v, six.string_types) or v]
97
else:
98
- msg = "{0!r} must be of type: string or non-dictionary iterable.".format(s)
99
- raise ValueError(msg)
+ raise ValueError("{!r} must be of type: string or non-dictionary "
+ "iterable".format(s))
100
+ # Cast `str` to keep Py2 happy despite `unicode_literals`.
101
+ try:
102
+ f.__name__ = str("{}list".format(scalar_validator.__name__))
103
+ except AttributeError: # class instance.
104
+ f.__name__ = str("{}List".format(type(scalar_validator).__name__))
105
f.__doc__ = scalar_validator.__doc__
106
return f
107
0 commit comments