There doesn't appear to be any easy way to do this.
As a workaround, you can try something like this in your RST file:
.. autoclass:: StatusUpdateAdapter
:members: methodA, methodB
But that requires listing out all the methods you do want to document by hand, which could be quite laborious. It also probably doesn't interact well with :inherited-members:
, if you're using that.
Another option is to put a docstring on every method you want documented, but no docstring on the log()
method, then (if necessary) use :no-undoc-members:
. This is obviously no good if you plan on documenting your internal interfaces or not documenting your public interfaces.
Finally, Autodoc skips anything whose name begins with an underscore unless configured otherwise (:private-members:
), so if you use an underscore-prefixed name, the method will not appear. Underscore-prefixing indicates a private interface under PEP 8, which may or may not match up with your intentions. This could also create backwards compatibility headaches in an established codebase.
:exclude-members:
in the docstring with no luck. Have you found a solution since then? – Tiffaneytiffani