sphinx-autoapi
sphinx-autoapi copied to clipboard
References to hidden members remain unresolved when a documented alternative exists
Here is an example scenario:
# mypackage/__init__.py
from ._submodule import func, PublicClass
__all__ = ("func", "PublicClass")
# mypackage/_submodule.py
class PublicClass:
pass
def func(a: PublicClass) -> bool:
return True
In this scenario, AutoAPI currently documents mypackage.func
as the following:
def func(a: mypackage._submodule.PublicClass) -> bool:
...
If mypackage._submodule.PublicClass
is not documented, then the reference in the signature won't resolve and readers can't click though to the definition of the class. Ideally mypackage.func
would be documented as follows so that the reference to PublicClass
is resolved and is therefore a clickable link:
def func(a: mypackage.PublicClass) -> bool:
...