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

D102 - false positive on overload with comment #635

Open
@DetachHead

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions