Skip to content

False positive identified for prefer-equals-comparison rule #1826

@SeanLedford

Description

@SeanLedford

While debugging and improving the fixer for the prefer-equals-comparison rule, a case for potential false positives was identified. For set comprehensions like the following:

some_var := {var1 | var1 = apples[_].name}

var1 is being assigned a value and not meant to be a comparison. However, the linter is reporting a prefer-equals-comparison violation here, which shouldn't be the case.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions