Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

D401 "not in imperative mood" not truly applicable to @property #531

@stefano-xy

Description

@stefano-xy

@property methods are not used as methods. Their docstrings are used to set the description of the properties. Errors like D401 "docstring not in imperative mood" should not be applicable to methods, at least to getters, that define a @property.

IMHO, the following docstring should be accepted for x, although not in imperative mood:

@property
def x(self):
    "The X property"
    return self._x

Alternatively, please classify these errors differently, so users can switch them off.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions