Skip to content

Add Ruff rule: useless-expression (B018) #1235

Description

@genedan

What this rule does is flag statements that have no effect, for example:

def my_function(x: int) -> int:
    1 + 1
    return x + 5

1 + 1 would have no effect, and Ruff should flag it so that it can be removed.

Metadata

Metadata

Assignees

Labels

Great First Contribution! 🌱Beginner friendly tickets with narrow scope and huge impact. Perfect to get your feet wet!

Fields

Priority

Low

Effort

Low

Scope

Documentation

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions