Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8747e23

Browse files
committed
FIX: unicode in plot_directive inline code blocks
1 parent 2532e4b commit 8747e23

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/sphinxext/plot_directive.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ def run(arguments, content, options, state_machine, state, lineno):
699699
output_base = os.path.basename(source_file_name)
700700
else:
701701
source_file_name = rst_file
702-
code = textwrap.dedent("\n".join(map(str, content)))
702+
code = textwrap.dedent("\n".join(map(six.text_type, content)))
703703
counter = document.attributes.get('_plot_counter', 0) + 1
704704
document.attributes['_plot_counter'] = counter
705705
base, ext = os.path.splitext(os.path.basename(source_file_name))

0 commit comments

Comments
 (0)