PyCQA/pydocstyle

D102 - false positive on overload with comment

DetachHead opened this issue · 0 comments

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"""