pydocstyle icon indicating copy to clipboard operation
pydocstyle copied to clipboard

D401 check does not accept sentences beginning with an adverb

Open vbrozik opened this issue 3 years ago • 0 comments

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

vbrozik avatar Jun 11 '21 09:06 vbrozik