Skip to content

Fix deprecation of encoding in plot_directive. #20559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/sphinxext/plot_directive.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def _option_format(arg):


def _deprecated_option_encoding(arg):
_api.warn_deprecated("3.5", "encoding", obj_type="option")
_api.warn_deprecated("3.5", name="encoding", obj_type="option")
return directives.encoding(arg)


Expand Down
4 changes: 3 additions & 1 deletion lib/matplotlib/tests/tinypages/some_plots.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,11 @@ Plot 14 uses ``include-source``:

# Only a comment

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

.. plot:: range4.py
:encoding: utf-8

This is the caption for plot 15.

Expand Down