Skip to content

superfluous-literal-comparison #20203

@dorschw

Description

@dorschw

Summary

Code like this is likely unintended and redundant:

if x == 0 and x != 1: ...

To keep things simple, only check comparison with literals, not with variables (allow x == variable and x != other_variable)

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-decisionAwaiting a decision from a maintainerruleImplementing or modifying a lint rule

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions