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

D102 - false positive on overload with comment #635

Open
DetachHead opened this issue Feb 20, 2023 · 0 comments
Open

D102 - false positive on overload with comment #635

DetachHead opened this issue Feb 20, 2023 · 0 comments

Comments

@DetachHead
Copy link

DetachHead commented Feb 20, 2023

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"""
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant