MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / check_output_base_name

Function check_output_base_name

lib/matplotlib/sphinxext/plot_directive.py:645–661  ·  view source on GitHub ↗
(env, output_base)

Source from the content-addressed store, hash-verified

643
644
645def check_output_base_name(env, output_base):
646 docname = env.docname
647
648 if '.' in output_base or '/' in output_base or '\\' in output_base:
649 raise PlotError(
650 f"The filename-prefix '{output_base}' is invalid. "
651 f"It must not contain dots or slashes.")
652
653 for d in env.mpl_plot_image_basenames:
654 if output_base in env.mpl_plot_image_basenames[d]:
655 if d == docname:
656 raise PlotError(
657 f"The filename-prefix {output_base!r} is used multiple times.")
658 raise PlotError(f"The filename-prefix {output_base!r} is used multiple"
659 f"times (it is also used in {env.doc2path(d)}).")
660
661 env.mpl_plot_image_basenames[docname].add(output_base)
662
663
664def render_figures(code, code_path, output_dir, output_base, context,

Callers 1

runFunction · 0.85

Calls 2

PlotErrorClass · 0.85
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…