Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ee52f21

Browse filesBrowse files
committed
Clarify deprecation message re: tex/pgf preambles as list-of-strings.
1 parent 28f41f9 commit ee52f21
Copy full SHA for ee52f21

File tree

Expand file treeCollapse file tree

1 file changed

+9
-7
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-7
lines changed

‎lib/matplotlib/rcsetup.py

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+9-7Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,19 +170,21 @@ def validate_bool_maybe_none(b):
170170

171171

172172
def _validate_tex_preamble(s):
173-
message = (
174-
f"Support for setting the 'text.latex.preamble' and 'pgf.preamble' "
175-
f"rcParams to {s!r} is deprecated since %(since)s and will be "
176-
f"removed %(removal)s; please set them to plain (possibly empty) "
177-
f"strings instead.")
178173
if s is None or s == 'None':
179-
cbook.warn_deprecated("3.3", message=message)
174+
cbook.warn_deprecated(
175+
"3.3", message="Support for setting the 'text.latex.preamble' or "
176+
"'pgf.preamble' rcParam to None is deprecated since %(since)s and "
177+
"will be removed %(removal)s; set it to an empty string instead.")
180178
return ""
181179
try:
182180
if isinstance(s, str):
183181
return s
184182
elif np.iterable(s):
185-
cbook.warn_deprecated("3.3", message=message)
183+
cbook.warn_deprecated(
184+
"3.3", message="Support for setting the 'text.latex.preamble' "
185+
"or 'pgf.preamble' rcParam to a list of strings is deprecated "
186+
"since %(since)s and will be removed %(removal)s; set it to a "
187+
"single string instead.")
186188
return '\n'.join(s)
187189
else:
188190
raise TypeError

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.