File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -557,7 +557,8 @@ Class docstring
557557Use the same sections as outlined above (all except :ref: `Returns <returns >`
558558are applicable). The constructor (``__init__ ``) should also be documented
559559here, the :ref: `Parameters <params >` section of the docstring details the
560- constructor's parameters.
560+ constructor's parameters. The class docstring does not need to be repeated
561+ in a constructor, but is optional.
561562
562563An **Attributes ** section, located below the :ref: `Parameters <params >`
563564section, may be used to describe non-method attributes of the class::
Original file line number Diff line number Diff line change @@ -183,6 +183,9 @@ inline comments:
183183 def __init__ (self ): # numpydoc ignore=GL08
184184 pass
185185
186+ Note, if the :ref: `class <_classdoc >` docstring properly documents the
187+ constructor, the ``GL08 `` will be ignored by default.
188+
186189This is supported by the :ref: `CLI <validation_via_cli >`,
187190:ref: `pre-commit hook <pre_commit_hook >`, and
188191:ref: `Sphinx extension <validation_during_sphinx_build >`.
You can’t perform that action at this time.
0 commit comments