autoexception without documenting signature

20 views
Skip to first unread message

Fred Drake

unread,
Dec 10, 2021, 4:29:01 PM12/10/21
to sphinx-users
I'm trying to document an exception class for a library, and I don't want the constructor signature to be included at all.  The exception is intended only to be raised by the library; clients might want to catch the exception, but shouldn't be constructing new instances.

I'm using Sphinx 4.3.1 with autodoc_class_signature set to 'separated'.  This causes the signature to be omitted from the class itself, but forces the __init__ to be documented.  I tried adding :no-special-members: to the autoexception directive, but that didn't have any effect.

Any hints on how to do this with autodoc?  Thanks!


  -Fred
Reply all
Reply to author
Forward
0 new messages