-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Labels
Enhancement ✨Improvement to a componentImprovement to a componentMaintenanceDiscussion or action around maintaining pylint or the dev workflowDiscussion or action around maintaining pylint or the dev workflowNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation
Milestone
Description
Current problem
compare-to-zero and compare-to-empty-string are the same check basically than use-implicit-booleaness-not-copmparison.
Doing x != 0 feel safer and easier to understand than bool(x) for int (you need a background in C to understand that). Socompare-to-zero feel more opinionated which is probably why they are in their own optional checker.
compare-to-empty-string though is really an use-implicit-booleaness-not-copmparison check.
Desired solution
I think it would make sense to merge compare-to-empty-string . Renaming them so they all follow the same pattern could be an option.
Additional context
I've done the work in #6870 then realized that compare-to-zero was opinionated.
Metadata
Metadata
Assignees
Labels
Enhancement ✨Improvement to a componentImprovement to a componentMaintenanceDiscussion or action around maintaining pylint or the dev workflowDiscussion or action around maintaining pylint or the dev workflowNeeds PRThis issue is accepted, sufficiently specified and now needs an implementationThis issue is accepted, sufficiently specified and now needs an implementation