Derived from the flake8-pyi linter.
What it does#
Checks for the presence of redundant
Literal types and builtin super
types in an union.
Why is this bad?#
The use of
Literal types in a union with the builtin super type of one of
its literal members is redundant, as the super type is strictly more
general than the
Literal["A"] | str is equivalent to
Literal | int is equivalent to
int are the super