diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py index 1678929c5..af1392a60 100644 --- a/sphinx/domains/python.py +++ b/sphinx/domains/python.py @@ -40,6 +40,10 @@ class PyObject(ObjectDescription): """ Description of a general Python object. """ + option_spec = { + 'noindex': directives.flag, + 'module': directives.unchanged, + } doc_field_types = [ TypedField('parameter', label=l_('Parameters'), diff --git a/tests/root/objects.txt b/tests/root/objects.txt index 4e44a097d..7a93aeedc 100644 --- a/tests/root/objects.txt +++ b/tests/root/objects.txt @@ -10,6 +10,8 @@ Testing object descriptions .. function:: func_noindex :noindex: +.. function:: func_with_module + :module: foolib .. module:: mod :synopsis: Module synopsis.