typing.overload used
Detects use of overloaded functions.
Overloaded functions can often lead to runtime errors if the implementations are not consistent with the overload definitions.
We only emit a warning here as just using typing.overload will not necessarily lead to a runtime type error.
What gets flagged
Here is an example of an overloaded function that is not implemented correctly, but type checkers will not emit diagnostics for this:
| Python | |
|---|---|
1 2 3 4 5 6 7 8 9 10 | |
Unsoundness Checker Output
| Text Only | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
Mypy: No Diagnostic Emitted
Pyright: No Diagnostic Emitted
Ty: No Diagnostic Emitted