basedmypy
basedmypy copied to clipboard
`no-untyped-def` false positive on method overload with `/`
Gist to reproduce
class Foo:
@overload
def a(self, a: int, /) -> None: ...
@overload
def a(self, b: str, /) -> None: ...
def a(self, c: int | str, /) -> None: # error: Function is missing a type annotation for one or more arguments [no-untyped-def]
...
Basedmypy version
1.4 / 1.5.0b1
Workaround
Annotating the self resolves the error