pydocstyle
pydocstyle copied to clipboard
D401 check does not accept sentences beginning with an adverb
For example this method has a docstring sentence in imperative mood beginning with the adverb "always":
def ignore_aliases(self, data):
"""Always ignore aliases."""
return True
pydocstyle is unable to detect the imperative mood and complains about the word "always":
$ pydocstyle src/cpopt/obj_actions.py
src/cpopt/obj_actions.py:117 in public method `ignore_aliases`:
D401: First line should be in imperative mood; try rephrasing (found 'Always')
$ pydocstyle --version
6.1.1