summaryrefslogtreecommitdiff
path: root/sphinx/domains/python.py
diff options
context:
space:
mode:
Diffstat (limited to 'sphinx/domains/python.py')
-rw-r--r--sphinx/domains/python.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/sphinx/domains/python.py b/sphinx/domains/python.py
index f5bb3000c..e88f6b1db 100644
--- a/sphinx/domains/python.py
+++ b/sphinx/domains/python.py
@@ -328,7 +328,8 @@ class PyObject(ObjectDescription):
self.state.document.note_explicit_target(signode)
domain = cast(PythonDomain, self.env.get_domain('py'))
- domain.note_object(fullname, self.objtype)
+ domain.note_object(fullname, self.objtype,
+ location=(self.env.docname, self.lineno))
indextext = self.get_index_text(modname, name_cls)
if indextext:
@@ -743,7 +744,7 @@ class PyModule(SphinxDirective):
self.options.get('synopsis', ''),
self.options.get('platform', ''),
'deprecated' in self.options)
- domain.note_object(modname, 'module')
+ domain.note_object(modname, 'module', location=(self.env.docname, self.lineno))
targetnode = nodes.target('', '', ids=['module-' + modname],
ismod=True)