Bug Report
The provided test defines the generic function f() in two ways which are incompatible with each other – one has an upper bound, and the other has not.
However, when reporting this incompatibility, mypy prints two signatures that look equivalent because the upper bound is not mentioned in one of them.
This makes it very difficult to understand why mypy reports an error and how to fix it. Moreover, the error report looks like a bug in mypy.
To Reproduce
https://mypy-play.net/?mypy=1.11.2&python=3.12&enable-incomplete-feature=NewGenericSyntax&gist=06224b5d473a6be86cae73f00e4643f1
Bug Report
The provided test defines the generic function
f()in two ways which are incompatible with each other – one has an upper bound, and the other has not.However, when reporting this incompatibility,
mypyprints two signatures that look equivalent because the upper bound is not mentioned in one of them.This makes it very difficult to understand why
mypyreports an error and how to fix it. Moreover, the error report looks like a bug inmypy.To Reproduce
https://mypy-play.net/?mypy=1.11.2&python=3.12&enable-incomplete-feature=NewGenericSyntax&gist=06224b5d473a6be86cae73f00e4643f1