jdkandersson / flake8-docstrings-complete

Apache License 2.0
12 stars 3 forks source link

Avoid raising DCO010 (missing docstring) for overloads #20

Closed vpoulailleau closed 11 months ago

vpoulailleau commented 12 months ago

Here is a sample code that triggers DCO010 for overloads:

from typing import overload

@overload
def factorial(n: int) -> int:
    ...

@overload
def factorial(n: float) -> float:
    ...

def factorial(n):
    """Return the factorial of n."""
    ...

More on this: https://docs.astral.sh/ruff/rules/overload-with-docstring/