Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

References to hidden members remain unresolved when a documented alternative exists #469

Open
AWhetter opened this issue Jul 26, 2024 · 0 comments

Comments

@AWhetter
Copy link
Collaborator

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:
    ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant