Skip to content
This repository was archived by the owner on Sep 25, 2019. It is now read-only.

Demonstration of a bug with including plots in docstrings with numpydoc

Notifications You must be signed in to change notification settings

lagru/docstring-plot-bug-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Demo
====

Run `make html` in this directory. The output should contain the following
error message:

```
/**/demo_module.py:docstring of demo_module.bar:22: WARNING: Exception occurred in plotting index-1 from /**/index.rst:
Traceback (most recent call last):
  File "/**/site-packages/matplotlib/sphinxext/plot_directive.py", line 524, in run_code
    six.exec_(code, ns)
  File "<string>", line 2
    but end the docstring with a text line right after invoking `plt.show()` the
          ^
SyntaxError: invalid syntax
```

Open the file `_build/html/index.html` and compare how the docstrings of the
two functions are rendered. One doesn't contain the expected plot!

About

Demonstration of a bug with including plots in docstrings with numpydoc

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published