Skip to content

Commit

Permalink
handle python -OO (#2393)
Browse files Browse the repository at this point in the history
* handle python -OO

* apply black
  • Loading branch information
JohannesBuchner authored Oct 8, 2024
1 parent 9411317 commit 0868c9e
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 0868c9e

Please sign in to comment.