diff options
author | Todd Gamblin <tgamblin@llnl.gov> | 2017-09-27 02:25:45 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-09-30 02:06:59 -0700 |
commit | 2198a0e2295e7ac4969a220580cceecfbb47af11 (patch) | |
tree | 9736747202c8a77c0bc95ed09a88ba8fad388489 /lib | |
parent | 0e8bb9ec5e6b674ecb8ebab15ac2a16666802f2a (diff) | |
download | spack-2198a0e2295e7ac4969a220580cceecfbb47af11.tar.gz spack-2198a0e2295e7ac4969a220580cceecfbb47af11.tar.bz2 spack-2198a0e2295e7ac4969a220580cceecfbb47af11.tar.xz spack-2198a0e2295e7ac4969a220580cceecfbb47af11.zip |
Disable duplicate cross-reference warnings in Sphinx.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/docs/conf.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index 887d04b565..b27a3a5538 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -135,6 +135,20 @@ for line in fileinput.input('spack.rst', inplace=1): # Enable todo items 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 ----------------------------------------------------- # If your documentation needs a minimal Sphinx version, state it here. |