Uniformize compare-to-zero
, compare-to-empty-string
with the use-implicit-booleaness-x
checks
#6871
Labels
Enhancement ✨
Improvement to a component
Maintenance
Discussion or action around maintaining pylint or the dev workflow
Needs PR
This issue is accepted, sufficiently specified and now needs an implementation
Milestone
Current problem
compare-to-zero
andcompare-to-empty-string
are the same check basically thanuse-implicit-booleaness-not-copmparison
.Doing
x != 0
feel safer and easier to understand thanbool(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 anuse-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
#6861
I've done the work in #6870 then realized that
compare-to-zero
was opinionated.The text was updated successfully, but these errors were encountered: