Skip to content

Commit 998d72f

Browse files
committed
DOC: Described new class docstring and constructor GL08 interaction
1 parent bd64a7d commit 998d72f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

doc/format.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,8 @@ Class docstring
557557
Use the same sections as outlined above (all except :ref:`Returns <returns>`
558558
are applicable). The constructor (``__init__``) should also be documented
559559
here, 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

562563
An **Attributes** section, located below the :ref:`Parameters <params>`
563564
section, may be used to describe non-method attributes of the class::

doc/validation.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff 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+
186189
This 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>`.

0 commit comments

Comments
 (0)