duplicate-literal-member (PYI062)
Added in 0.6.0 · Related issues · View source
Derived from the flake8-pyi linter.
Fix is always available.
What it does
Checks for duplicate members in a typing.Literal[] slice.
Why is this bad?
Duplicate literal members are redundant and should be removed.
Example
Use instead:
Fix safety
This rule's fix is marked as safe, unless the type annotation contains comments.
Note that while the fix may flatten nested literals into a single top-level literal, the semantics of the annotation will remain unchanged.