Skip to content

Commit e28fd40

Browse files
committed
Try and get around stupid sphinx resolution of type
1 parent 2aa42f5 commit e28fd40

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/source/conf.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
# -- Project information ----------------------------------------------------
44
import datetime
55
import os
6+
from sphinx.domains.python import PythonDomain
67

78
from sasdata import __version__ as sasdata_version
89

@@ -43,6 +44,15 @@ def on_missing_reference(app, env, node, contnode):
4344
else:
4445
return None
4546

47+
# Bypass stupid sphinx handling of multiple classes with members named *type*
48+
class PatchedPythonDomain(PythonDomain):
49+
def resolve_xref(self, env, fromdocname, builder, typ, target, node, contnode):
50+
if 'refspecific' in node:
51+
del node['refspecific']
52+
return super(PatchedPythonDomain, self).resolve_xref(
53+
env, fromdocname, builder, typ, target, node, contnode)
4654

4755
def setup(app):
4856
app.connect("missing-reference", on_missing_reference)
57+
app.override_domain(PatchedPythonDomain)
58+
app.add_domain(PatchedPythonDomain, override=True)

0 commit comments

Comments
 (0)