Closed
Description
Current problem
Currently we emit nothing about the following pattern, which can be simplified:
ANSWER: int | int = 42
Desired solution
Emit a warning when this pattern is detected. A union typehint containing the same type multiple times can be simplified. Potential name: typehint-duplicate-union-type
.
Additional context
This is the same issue as reported in python/mypy#13448 although it doesn't look like it will be implemented by the type-checker.