summaryrefslogtreecommitdiff
path: root/doc/usage/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'doc/usage/extensions')
-rw-r--r--doc/usage/extensions/autodoc.rst24
-rw-r--r--doc/usage/extensions/example_google.py3
-rw-r--r--doc/usage/extensions/example_numpy.py3
-rw-r--r--doc/usage/extensions/inheritance.rst2
-rw-r--r--doc/usage/extensions/math.rst2
-rw-r--r--doc/usage/extensions/napoleon.rst4
-rw-r--r--doc/usage/extensions/viewcode.rst7
7 files changed, 30 insertions, 15 deletions
diff --git a/doc/usage/extensions/autodoc.rst b/doc/usage/extensions/autodoc.rst
index 064463691..36d497543 100644
--- a/doc/usage/extensions/autodoc.rst
+++ b/doc/usage/extensions/autodoc.rst
@@ -45,6 +45,10 @@ docstrings to correct reStructuredText before :mod:`autodoc` processes them.
.. _NumPy:
https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt
+
+Directives
+----------
+
:mod:`autodoc` provides several directives that are versions of the usual
:rst:dir:`py:module`, :rst:dir:`py:class` and so forth. On parsing time, they
import the corresponding module and extract the docstring of the given objects,
@@ -306,6 +310,9 @@ inserting them into the page source under a suitable :rst:dir:`py:module`,
well-behaved decorating functions.
+Configuration
+-------------
+
There are also new config values that you can set:
.. confval:: autoclass_content
@@ -376,9 +383,10 @@ There are also new config values that you can set:
Setting ``None`` is equivalent to giving the option name in the list format
(i.e. it means "yes/true/on").
- The supported options are ``'members'``, ``'undoc-members'``,
- ``'private-members'``, ``'special-members'``, ``'inherited-members'``,
- ``'show-inheritance'``, ``'ignore-module-all'`` and ``'exclude-members'``.
+ The supported options are ``'members'``, ``'member-order'``,
+ ``'undoc-members'``, ``'private-members'``, ``'special-members'``,
+ ``'inherited-members'``, ``'show-inheritance'``, ``'ignore-module-all'`` and
+ ``'exclude-members'``.
.. versionadded:: 1.8
@@ -432,6 +440,16 @@ There are also new config values that you can set:
.. versionadded:: 1.7
+.. confval:: suppress_warnings
+ :noindex:
+
+ :mod:`autodoc` supports to suppress warning messages via
+ :confval:`suppress_warnings`. It allows following warnings types in
+ addition:
+
+ * autodoc
+ * autodoc.import_object
+
Docstring preprocessing
-----------------------
diff --git a/doc/usage/extensions/example_google.py b/doc/usage/extensions/example_google.py
index 4f6abacdf..97ffe8a05 100644
--- a/doc/usage/extensions/example_google.py
+++ b/doc/usage/extensions/example_google.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
"""Example Google style docstrings.
This module demonstrates documentation as specified by the `Google Python
@@ -178,7 +177,7 @@ class ExampleError(Exception):
self.code = code
-class ExampleClass(object):
+class ExampleClass:
"""The summary line for a class docstring should fit on one line.
If the class has public attributes, they may be documented here
diff --git a/doc/usage/extensions/example_numpy.py b/doc/usage/extensions/example_numpy.py
index dbee080c3..2712447f4 100644
--- a/doc/usage/extensions/example_numpy.py
+++ b/doc/usage/extensions/example_numpy.py
@@ -1,4 +1,3 @@
-# -*- coding: utf-8 -*-
"""Example NumPy style docstrings.
This module demonstrates documentation as specified by the `NumPy
@@ -223,7 +222,7 @@ class ExampleError(Exception):
self.code = code
-class ExampleClass(object):
+class ExampleClass:
"""The summary line for a class docstring should fit on one line.
If the class has public attributes, they may be documented here
diff --git a/doc/usage/extensions/inheritance.rst b/doc/usage/extensions/inheritance.rst
index ef78d04fe..c66f4130f 100644
--- a/doc/usage/extensions/inheritance.rst
+++ b/doc/usage/extensions/inheritance.rst
@@ -54,7 +54,7 @@ It adds this directive:
E D F
"""
- class A(object):
+ class A:
pass
class B(A):
diff --git a/doc/usage/extensions/math.rst b/doc/usage/extensions/math.rst
index 9daa03186..9e62c1425 100644
--- a/doc/usage/extensions/math.rst
+++ b/doc/usage/extensions/math.rst
@@ -183,7 +183,7 @@ Sphinx.
The default is empty (not configured).
-.. _Using in-line configuration options: http://docs.mathjax.org/en/latest/configuration.html#using-in-line-configuration-options
+.. _Using in-line configuration options: https://docs.mathjax.org/en/latest/configuration.html#using-in-line-configuration-options
:mod:`sphinx.ext.jsmath` -- Render math via JavaScript
------------------------------------------------------
diff --git a/doc/usage/extensions/napoleon.rst b/doc/usage/extensions/napoleon.rst
index 160375fe7..0460f1607 100644
--- a/doc/usage/extensions/napoleon.rst
+++ b/doc/usage/extensions/napoleon.rst
@@ -409,10 +409,10 @@ sure that "sphinx.ext.napoleon" is enabled in `conf.py`::
.. attribute:: attr1
- *int*
-
Description of `attr1`
+ :type: int
+
.. confval:: napoleon_use_param
True to use a ``:param:`` role for each function parameter. False to
diff --git a/doc/usage/extensions/viewcode.rst b/doc/usage/extensions/viewcode.rst
index cc7dbb07a..d3c3c44fb 100644
--- a/doc/usage/extensions/viewcode.rst
+++ b/doc/usage/extensions/viewcode.rst
@@ -41,10 +41,9 @@ Configuration
.. confval:: viewcode_follow_imported_members
- If this is ``True``, viewcode extension will follow alias objects that
- imported from another module such as functions, classes and attributes. As
- side effects, this option else they produce nothing. The default is
- ``True``.
+ If this is ``True``, viewcode extension will emit
+ :event:`viewcode-follow-imported` event to resolve the name of the module
+ by other extensions. The default is ``True``.
.. versionadded:: 1.3