sphinx-automodapi icon indicating copy to clipboard operation
sphinx-automodapi copied to clipboard

Resolve references when inheriting docstrings

Open embray opened this issue 10 years ago • 0 comments

Related to #156, but different--since automatic docstring inheritance isn't a normal "thing" in Python, Sphinx falls over a bit when this happens.

Normally when we write a docstring we don't have to write references within the same module with a fully qualified name. For example, if I'm writing a docstring for a method in the ConfigItem class, I can refer to it just by:

`ConfigItem`

However, if I have a subclass of ConfigItem in a different module, and it inherits a docstring from one of ConfigItem's methods that it otherwise overrides, it can no longer resolve that reference, because it looks for ConfigItem within the same module, not within the module that docstring originally came from. So we need to make autodoc somehow aware that this can happen in some cases.

embray avatar Apr 10 '15 14:04 embray