Replies: 3 comments 3 replies
-
I don't think such a rule exists today. @AlexWaygood any thoughts? |
Beta Was this translation helpful? Give feedback.
-
E712 allows Maybe instead of adding a new rule, we could just make E712 configurable. The default could be the current behaviour (lenient, avoids false positives), but we could have a setting that makes it stricter and also disallows identity comparisons to the |
Beta Was this translation helpful? Give feedback.
-
That would be great - I'd be happy with either a new rule or making E712 configurable. Is their precedent for configurable rules in Python? It's common in JS linting tools but I don't think I've seen it in Python before. |
Beta Was this translation helpful? Give feedback.
-
I would like to enforce that checks for True/False identity always take the form
if _
rather thanif _ is True
. E712 allows theis
form. Is there an enhanced check I could do?Beta Was this translation helpful? Give feedback.
All reactions