Skip to content

Commit ce0e433

Browse files
committed
Fix deprecation of encoding in plot_directive.
1 parent 070e093 commit ce0e433

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/matplotlib/sphinxext/plot_directive.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def _option_format(arg):
197197

198198

199199
def _deprecated_option_encoding(arg):
200-
_api.warn_deprecated("3.5", "encoding", obj_type="option")
200+
_api.warn_deprecated("3.5", name="encoding", obj_type="option")
201201
return directives.encoding(arg)
202202

203203

lib/matplotlib/tests/tinypages/some_plots.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,11 @@ Plot 14 uses ``include-source``:
120120

121121
# Only a comment
122122

123-
Plot 15 uses an external file with the plot commands and a caption:
123+
Plot 15 uses an external file with the plot commands and a caption (the
124+
encoding is ignored and just verifies the deprecation is not broken):
124125

125126
.. plot:: range4.py
127+
:encoding: utf-8
126128

127129
This is the caption for plot 15.
128130

0 commit comments

Comments
 (0)