Skip to content

Commit

Permalink
handle python -OO
Browse files Browse the repository at this point in the history
  • Loading branch information
JohannesBuchner committed Oct 8, 2024
1 parent 9411317 commit e920777
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions arviz/plots/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,11 @@ def _copy_docstring(lib, function):


# TODO: try copying substitutions too, or autoreplace them ourselves
output_notebook.__doc__ += "\n\n" + _copy_docstring("bokeh.plotting", "output_notebook").replace(
"|save|", "save"
).replace("|show|", "show")
output_file.__doc__ += "\n\n" + _copy_docstring("bokeh.plotting", "output_file").replace(
"|save|", "save"
).replace("|show|", "show")
ColumnDataSource.__doc__ += "\n\n" + _copy_docstring("bokeh.models", "ColumnDataSource")
if output_notebook.__doc__ is not None: # if run with python -OO, __doc__ is stripped
output_notebook.__doc__ += "\n\n" + _copy_docstring("bokeh.plotting", "output_notebook").replace(
"|save|", "save"
).replace("|show|", "show")
output_file.__doc__ += "\n\n" + _copy_docstring("bokeh.plotting", "output_file").replace(
"|save|", "save"
).replace("|show|", "show")
ColumnDataSource.__doc__ += "\n\n" + _copy_docstring("bokeh.models", "ColumnDataSource")

0 comments on commit e920777

Please sign in to comment.