pydocstyle
pydocstyle copied to clipboard
D102 triggered for functions decorated with `typing.overload` rather than `overload`
Related to #419 but not quite
As a result of #419, pydocstyle now checks the decorators of a function such that if they match the name overload
(and only that) then it skips checking for docstrings. However, not all people like to import from typing
and instead import it or import alias it, e.g.,
import typing
import typing as t
This means that then doing
@t.overload
def foo(s: str) -> str:
...
# alternatively
@typing.overload
def foo(s: str) -> str:
...
Triggers a D102.