mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #4221: napoleon depends on autodoc, but users need to load it manually
This commit is contained in:
parent
c3113d2e17
commit
4abe6cb62e
1
CHANGES
1
CHANGES
@ -20,6 +20,7 @@ Bugs fixed
|
|||||||
|
|
||||||
* #4206: latex: reST label between paragraphs loses paragraph break
|
* #4206: latex: reST label between paragraphs loses paragraph break
|
||||||
* #4231: html: Apply fixFirefoxAnchorBug only under Firefox
|
* #4231: html: Apply fixFirefoxAnchorBug only under Firefox
|
||||||
|
* #4221: napoleon depends on autodoc, but users need to load it manually
|
||||||
|
|
||||||
Testing
|
Testing
|
||||||
--------
|
--------
|
||||||
|
@ -68,8 +68,8 @@ Getting Started
|
|||||||
|
|
||||||
# conf.py
|
# conf.py
|
||||||
|
|
||||||
# Add autodoc and napoleon to the extensions list
|
# Add napoleon to the extensions list
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']
|
extensions = ['sphinx.ext.napoleon']
|
||||||
|
|
||||||
2. Use `sphinx-apidoc` to build your API documentation::
|
2. Use `sphinx-apidoc` to build your API documentation::
|
||||||
|
|
||||||
@ -246,13 +246,12 @@ Configuration
|
|||||||
|
|
||||||
Listed below are all the settings used by napoleon and their default
|
Listed below are all the settings used by napoleon and their default
|
||||||
values. These settings can be changed in the Sphinx `conf.py` file. Make
|
values. These settings can be changed in the Sphinx `conf.py` file. Make
|
||||||
sure that both "sphinx.ext.autodoc" and "sphinx.ext.napoleon" are
|
sure that "sphinx.ext.napoleon" is enabled in `conf.py`::
|
||||||
enabled in `conf.py`::
|
|
||||||
|
|
||||||
# conf.py
|
# conf.py
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings
|
# Add any Sphinx extension module names here, as strings
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']
|
extensions = ['sphinx.ext.napoleon']
|
||||||
|
|
||||||
# Napoleon settings
|
# Napoleon settings
|
||||||
napoleon_google_docstring = True
|
napoleon_google_docstring = True
|
||||||
|
@ -27,13 +27,12 @@ class Config(object):
|
|||||||
|
|
||||||
Listed below are all the settings used by napoleon and their default
|
Listed below are all the settings used by napoleon and their default
|
||||||
values. These settings can be changed in the Sphinx `conf.py` file. Make
|
values. These settings can be changed in the Sphinx `conf.py` file. Make
|
||||||
sure that both "sphinx.ext.autodoc" and "sphinx.ext.napoleon" are
|
sure that "sphinx.ext.napoleon" is enabled in `conf.py`::
|
||||||
enabled in `conf.py`::
|
|
||||||
|
|
||||||
# conf.py
|
# conf.py
|
||||||
|
|
||||||
# Add any Sphinx extension module names here, as strings
|
# Add any Sphinx extension module names here, as strings
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']
|
extensions = ['sphinx.ext.napoleon']
|
||||||
|
|
||||||
# Napoleon settings
|
# Napoleon settings
|
||||||
napoleon_google_docstring = True
|
napoleon_google_docstring = True
|
||||||
@ -294,6 +293,7 @@ def setup(app):
|
|||||||
|
|
||||||
_patch_python_domain()
|
_patch_python_domain()
|
||||||
|
|
||||||
|
app.setup_extension('sphinx.ext.autodoc')
|
||||||
app.connect('autodoc-process-docstring', _process_docstring)
|
app.connect('autodoc-process-docstring', _process_docstring)
|
||||||
app.connect('autodoc-skip-member', _skip_member)
|
app.connect('autodoc-skip-member', _skip_member)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user