-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Current problem
Currently the redundant typehint check only runs against variable type annotations. But that isn't the only place where redundant types can occur. For example, they can occur in function signatures:
def f(p: int | int) -> str | str: ...They can occur in compound types:
z: dict[int | int, str | str]And they can occur in type aliases:
Q = int | intDesired solution
Check for redundant types anywhere they can occur, or at least in as many places as possible.
Additional context
No response
Pierre-Sassoulas