-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers
Description
ruff version 0.1.0 (and likely any older version)
Currently using B015 we get the following message:
B015 Pointless comparison. This comparison does nothing but waste CPU instructions. Either prepend `assert` or remove it.
This message is very unhelpful because no ones writes foo = bar in a line and cares about wasting CPU instructions. It just sounds like this is one of those annoying fixes that won't catch any bugs.
The actual use case for this test should be when someone types == by accident and wanted to type = instead.
like data['success'] == False instead of data['success'] = False
This message should be something in the lines:
B015 Pointless comparison. This comparison does nothing. Did you mean to assign a value? Otherwise prepend `assert` or remove it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationgood first issueGood for newcomersGood for newcomers