Chilipp / autodocsumm

Extending your autodoc API docs with a summary
Apache License 2.0
48 stars 14 forks source link

Warning when building documentation with v0.2.0 or v0.2.1 #32

Closed bouweandela closed 3 years ago

bouweandela commented 4 years ago

Since version 0.2 of autodocsumm, we are seeing the following warning when building our documentation:

some_module.py:docstring of some_module.some_function:1:<autosummary>:1: WARNING: Inline emphasis start-string without end-string.

The warning appears in files that have

from itertools import product

at the top. I suspect it has something to do with the asterisk in the first argument of itertools.product (it's *iterables), but I'm not sure. My apologies for the slightly vague bug report, if there's any way in which I can make it more clear, please let me know.

Chilipp commented 4 years ago

hi @bouweandela! thanks for reporting this! Could you simply post a python module file that you think reproduces this bug? Then I can make a small setup with sphinx to test it.

bouweandela commented 4 years ago

Here is a fairly minimal example:

I generated a default sphinx configuration using sphinx-quickstart and appended the following code to the generated conf.py:

import sys
from pathlib import Path

sys.path.insert(0, str(Path(__file__).absolute().parent))

extensions = [
    "sphinx.ext.autodoc",
    "autodocsumm",
]

autodoc_default_options = {
    "members": True,
    "autosummary": True,
}

content of test.py:

from itertools import product

content of index.rst:

.. automodule:: test

Running

make clean && make html

then results in:

Removing everything under '_build'...
Running Sphinx v3.1.2
making output directory... done
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 1 source files that are out of date
updating environment: [new config] 1 added, 0 changed, 0 removed
reading sources... [100%] index                                                                                                             
/home/bandela/src/test/test.py:docstring of test:1:<autosummary>:1: WARNING: Inline emphasis start-string without end-string.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [100%] index                                                                                                              
generating indices...  genindex py-modindexdone
writing additional pages...  searchdone
copying static files... ... done
copying extra files... done
dumping search index in English (code: en)... done
dumping object inventory... done
build succeeded, 1 warning.

The HTML pages are in _build/html.