Rules
invalid-overload-implementation
Default level: error
.
What it does
Checks for invalid overload implementation.
Why is this bad?
Invalid overload implementation can lead to runtime errors.
Examples
from typing import overload
@overload
def foo(x: int) -> str: ...
@overload
def foo(x: str) -> int: ...
def foo(x: int | str) -> int | str:
return x
foo("1")
typing-any-used
Default level: error
.
What it does
Checks for usage of typing.Any
in type annotations.
Why is this bad?
Using typing.Any
in type annotations can lead to runtime errors.
Examples