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

Show source from private modules #515

Open
pafi-code opened this issue Mar 5, 2025 · 0 comments
Open

Show source from private modules #515

pafi-code opened this issue Mar 5, 2025 · 0 comments

Comments

@pafi-code
Copy link

Sometimes when I don't want to expose everything in a module, subpackage or whatever I go the following way:

my_package
    __init__.py
    _my_subpackage
        __init__.py
        _my_module.py

Let's say I would like to expose a class from _my_module.py. Then I would do this via exposing the class into _my_subpackage.__init__.py and then into my_package.__init__.py. So I can then use it like this: my_package.MyClass.

So what I want is to just generate api for the top level part where everything is supposed to be public. Therefore I don't use the private-members configuration.
This works in a sense that MyClass can be seen under autoapi/index.html. However I'm missing the very neat [source] button that redirects me to the source where MyClass is implemented, because obviously the file where it's implement is private and therefore nothing get's generated in the build/html/modules/ directory for it.

Is there a workaround for this by chance? 😆 (I know that this is a very specific kind of case)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant