Sphinx creates links in variable list to classes with the same names

276 Views Asked by At

I'm using Sphinx's apidoc extension to produce documentation for a Python project. It's somewhat quirkier than I had expected, but I've gotten most things to work. However, one quirk has me stumped.

I've got a couple of classes with docstrings that include something like this:

"""
:ivar normal_attr1:  This is a normal attribute.
:ivar doppleganger:  This is an attribute with the same name as a class in
    another module.

""""

Sphinx is automatically adding a link from "doppleganger" to the class whose name it shares--and I can't find a way to stop it. In ordinary circumstances, I'd just change one of the names, but unfortunately, both names are are from code autogenerated from an XSD specification that I'm not at liberty to change.

Is there any easy way to stop these links from being inserted?

0

There are 0 best solutions below