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