PyCQA / pydocstyle

docstring style checker
http://pydocstyle.org
MIT License
1.11k stars 188 forks source link

(🎁) Perform checks on strings under variable declarations #630

Open KotlinIsland opened 1 year ago

KotlinIsland commented 1 year ago

No linting is performed on doc strings for variables. PyCharm, VSCode and pydoc3 all support this use case. I would expect all of these usages to be linted.

a = 1
"""idgi???"""  # no lint errors

b: int
"""idgi???"""  # no lint errors

class a:
    a = 1
    """idgi???"""  # no lint errors

    b: int
    """idgi???"""  # no lint errors

    def __init__(self, value):
        self.value = value
        """idgi???"""  # no lint errors

        self.other: int
        """idgi???"""  # no lint errors