Skip to content

Commit a87faa4

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

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
@@ -4,6 +4,8 @@
44
import datetime
55
import os
66

7+
from sphinx.domains.python import PythonDomain
8+
79
from sasdata import __version__ as sasdata_version
810

911
if os.path.exists('rst_prolog'):
@@ -43,6 +45,14 @@ def on_missing_reference(app, env, node, contnode):
4345
else:
4446
return None
4547

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

4756
def setup(app):
4857
app.connect("missing-reference", on_missing_reference)
58+
app.add_domain(PatchedPythonDomain, override=True)

0 commit comments

Comments
 (0)