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

__all__ doesn't seem to be respected

Open wbthomason opened this issue 1 year ago • 1 comments

Apologies if this is just me missing something - I'm new to both sphinx and autoapi, but: in contrast to the docs, __all__ does not seem to be respected in my package.

Specifically, I have a directory structure like:

src/mymodule
  __init__.py
  _impl/
    sub_a.py
    sub_b.py

In __init__.py I have from ._impl import sub_a as sub_a, etc., as well as __all__ = ("sub_a", "sub_b").

I would expect this to result in mymodule.sub_a and mymodule.sub_b being documented - but neither is, unless I enable documentation of private members, in which case they're documented as mymodule._impl.sub_a.

Is this expected behavior, and I'm making some mistake? If so, is there anything I can do (ideally short of template customization, if possible) to get the behavior I'm after?

Thanks, and thanks for autoapi - it's quite nice to use!

wbthomason avatar Apr 06 '24 06:04 wbthomason

Seems to be related to #298.

Ozaq avatar May 04 '24 18:05 Ozaq

Closing as a duplicate of #298

AWhetter avatar May 08 '24 04:05 AWhetter