PyCQA / pydocstyle

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

D102 - false positive on overload with comment #635

Open DetachHead opened 1 year ago

DetachHead commented 1 year ago
from typing import overload

class Foo:
    """asdf"""

    @overload  # this comment causes the error
    def foo(self):  # error: D102
        ...

    @overload
    def foo(self, value: int):  # no error because the docstring is on the implementation
        ...

    def foo(self, value: int | None = None):
        """asdf"""