Disable duplicate cross-reference warnings in Sphinx.
This commit is contained in:
parent
0e8bb9ec5e
commit
2198a0e229
1 changed files with 14 additions and 0 deletions
|
@ -135,6 +135,20 @@
|
||||||
# Enable todo items
|
# Enable todo items
|
||||||
todo_include_todos = True
|
todo_include_todos = True
|
||||||
|
|
||||||
|
#
|
||||||
|
# Disable duplicate cross-reference warnings.
|
||||||
|
#
|
||||||
|
from sphinx.domains.python import PythonDomain
|
||||||
|
class PatchedPythonDomain(PythonDomain):
|
||||||
|
def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
|
||||||
|
if 'refspecific' in node:
|
||||||
|
del node['refspecific']
|
||||||
|
return super(PatchedPythonDomain, self).resolve_xref(
|
||||||
|
env, fromdocname, builder, typ, target, node, contnode)
|
||||||
|
|
||||||
|
def setup(sphinx):
|
||||||
|
sphinx.override_domain(PatchedPythonDomain)
|
||||||
|
|
||||||
# -- General configuration -----------------------------------------------------
|
# -- General configuration -----------------------------------------------------
|
||||||
|
|
||||||
# If your documentation needs a minimal Sphinx version, state it here.
|
# If your documentation needs a minimal Sphinx version, state it here.
|
||||||
|
|
Loading…
Reference in a new issue