Skip to content

Catch variable is [] #8589

@francorbacho

Description

@francorbacho

Make F632 catch the following trap:

variable = []
if variable is []:
  print("never runs")

Tested in Arch Linux:

$ pacman -Q ruff 
ruff 0.1.5-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issueGood for newcomersruleImplementing 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