1

When documenting Python code using Sphinx (v8.2.3), the parameters of the class' initializer __init__(self, ...) are documented two times:

  1. in the class' description
  2. in the dunder init method

I consider this redundant information, especially as __init__() is the first method in the class and the information is repeated within a few centimeters on screen.

Question:
How can I disable the parameter documentation in the class description?

Example:
enter image description here

1
  • 1
    Did you adjust :class-doc-from: and autoclass_content? For me adjusting the later is generally enough - commonly users choose one or the other (merge the __init__ signature into the class or document it separately like a method). Commented Mar 27 at 21:03

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.