Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compare-to-zero] More actionnable and understandable message #7723

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented Nov 6, 2022

Type of Changes

Type
βœ“ πŸ”¨ Refactoring
βœ“ πŸ“œ Docs

Description

Originally done in order to normalize the use-implicit-booleaness check. This make the message more understandable and permit to make #6870 more reviewable. Also fix a false positive with x is False being falsely detected as a comparison to 0.

@Pierre-Sassoulas Pierre-Sassoulas added Documentation πŸ“— Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news πŸ”‡ This change does not require a changelog entry labels Nov 6, 2022
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the more-actionnable-message-for-compare-to-zΓ©ro branch from 42f96c2 to 6d896f3 Compare November 6, 2022 16:14
@coveralls
Copy link

coveralls commented Nov 6, 2022

Pull Request Test Coverage Report for Build 3405503653

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.007%) to 95.389%

Totals Coverage Status
Change from base Build 3404192728: 0.007%
Covered Lines: 17252
Relevant Lines: 18086

πŸ’› - Coveralls

@Pierre-Sassoulas Pierre-Sassoulas force-pushed the more-actionnable-message-for-compare-to-zΓ©ro branch from 6d896f3 to b0191fe Compare November 6, 2022 16:29
@github-actions

This comment has been minimized.

@Pierre-Sassoulas
Copy link
Member Author

Drafting as the primer detects false positives where False is mistaken for a 0 here.

@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as draft November 6, 2022 17:32
Originally done in order to normalize the use-implicit-booleaness check.
This make the message more understandable and permit to make pylint-dev#6870 more
reviewable.
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the more-actionnable-message-for-compare-to-zΓ©ro branch from 73787bf to cd5a1bb Compare November 6, 2022 18:28
@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as ready for review November 6, 2022 18:29
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2022

πŸ€– Effect of this PR on checked open source code: πŸ€–

Effect on astroid:
The following messages are now emitted:

  1. compare-to-zero:
    "open_brackets == 0" can be simplified to "not open_brackets" as 0 is falsey
    https://github.com/PyCQA/astroid/blob/4acf5785c54f4ccb8f41402991f6ddc5d8b28b89/astroid/rebuilder.py#L198
  2. compare-to-zero:
    "argindex == 0" can be simplified to "not argindex" as 0 is falsey
    https://github.com/PyCQA/astroid/blob/4acf5785c54f4ccb8f41402991f6ddc5d8b28b89/astroid/arguments.py#L212
  3. compare-to-zero:
    "last_index[names[0]] != 0" can be simplified to "last_index[names[0]]" as 0 is falsey
    https://github.com/PyCQA/astroid/blob/4acf5785c54f4ccb8f41402991f6ddc5d8b28b89/astroid/nodes/scoped_nodes/scoped_nodes.py#L153

The following messages are no longer emitted:

  1. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/PyCQA/astroid/blob/4acf5785c54f4ccb8f41402991f6ddc5d8b28b89/astroid/rebuilder.py#L190
  2. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/PyCQA/astroid/blob/4acf5785c54f4ccb8f41402991f6ddc5d8b28b89/astroid/rebuilder.py#L192
  3. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/PyCQA/astroid/blob/4acf5785c54f4ccb8f41402991f6ddc5d8b28b89/astroid/rebuilder.py#L198
  4. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/PyCQA/astroid/blob/4acf5785c54f4ccb8f41402991f6ddc5d8b28b89/astroid/arguments.py#L212
  5. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/PyCQA/astroid/blob/4acf5785c54f4ccb8f41402991f6ddc5d8b28b89/astroid/nodes/scoped_nodes/scoped_nodes.py#L153

Effect on black:
The following messages are now emitted:

  1. compare-to-zero:
    "self._unmatched_lpars == 0" can be simplified to "not self._unmatched_lpars" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/trans.py#L2098
  2. compare-to-zero:
    "self.depth == 0" can be simplified to "not self.depth" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/brackets.py#L109
  3. compare-to-zero:
    "tail_len == 0" can be simplified to "not tail_len" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/linegen.py#L707
  4. compare-to-zero:
    "index == 0" can be simplified to "not index" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/linegen.py#L945
  5. compare-to-zero:
    "self.bracket_tracker.depth == 0" can be simplified to "not self.bracket_tracker.depth" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L94
  6. compare-to-zero:
    "len(self.leaves) == 0" can be simplified to "not len(self.leaves)" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L183
  7. compare-to-zero:
    "leaf.lineno != 0" can be simplified to "leaf.lineno" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L248
  8. compare-to-zero:
    "leaf.lineno != 0" can be simplified to "leaf.lineno" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L250
  9. compare-to-zero:
    "current_line.depth == 0" can be simplified to "not current_line.depth" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L530
  10. compare-to-zero:
    "before == 0" can be simplified to "not before" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L625
  11. compare-to-zero:
    "len(nodes) == 0" can be simplified to "not len(nodes)" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/blib2to3/pytree.py#L942
  12. compare-to-zero:
    "len(nodes) == 0" can be simplified to "not len(nodes)" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/blib2to3/pytree.py#L947
  13. compare-to-zero:
    "x == 0" can be simplified to "not x" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/blib2to3/pgen2/conv.py#L179
  14. compare-to-zero:
    "parenlev == 0" can be simplified to "not parenlev" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/blib2to3/pgen2/tokenize.py#L485
  15. compare-to-zero:
    "len(alive_ilabels) == 0" can be simplified to "not len(alive_ilabels)" as 0 is falsey
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/blib2to3/pgen2/parse.py#L119

The following messages are no longer emitted:

  1. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/trans.py#L2098
  2. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/brackets.py#L109
  3. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/linegen.py#L707
  4. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/linegen.py#L945
  5. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L94
  6. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L183
  7. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L248
  8. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L250
  9. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L530
  10. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/black/lines.py#L625
  11. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/blib2to3/pytree.py#L942
  12. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/blib2to3/pytree.py#L947
  13. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/blib2to3/pgen2/conv.py#L179
  14. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/blib2to3/pgen2/tokenize.py#L485
  15. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/psf/black/blob/0e9d29ab73d608a79028e22a713ee717b5dcca96/src/blib2to3/pgen2/parse.py#L119

Effect on django:
The following messages are now emitted:

  1. compare-to-zero:
    "leapdays != 0" can be simplified to "leapdays" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/timesince.py#L65
  2. compare-to-zero:
    "count != 0" can be simplified to "count" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/timesince.py#L79
  3. compare-to-zero:
    "count == 0" can be simplified to "not count" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/timesince.py#L88
  4. compare-to-zero:
    "x == 0" can be simplified to "not x" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/baseconv.py#L99
  5. compare-to-zero:
    "i == 0" can be simplified to "not i" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/lorem_ipsum.py#L262
  6. compare-to-zero:
    "count == 0" can be simplified to "not count" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/regex_helper.py#L166
  7. compare-to-zero:
    "i != 0" can be simplified to "i" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/http.py#L184
  8. compare-to-zero:
    "space == 0" can be simplified to "not space" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/text.py#L50
  9. compare-to-zero:
    "space == 0" can be simplified to "not space" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/text.py#L52
  10. compare-to-zero:
    "truncate_len == 0" can be simplified to "not truncate_len" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/text.py#L105
  11. compare-to-zero:
    "count == 0" can be simplified to "not count" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/inspect.py#L69
  12. compare-to-zero:
    "self.data.minute == 0" can be simplified to "not self.data.minute" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/dateformat.py#L154
  13. compare-to-zero:
    "self.data.hour == 0" can be simplified to "not self.data.hour" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/dateformat.py#L154
  14. compare-to-zero:
    "self.data.minute == 0" can be simplified to "not self.data.minute" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/dateformat.py#L156
  15. compare-to-zero:
    "version[4] == 0" can be simplified to "not version[4]" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/version.py#L33
  16. compare-to-zero:
    "version[2] == 0" can be simplified to "not version[2]" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/version.py#L48
  17. compare-to-zero:
    "grouping != 0" can be simplified to "grouping" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/numberformat.py#L34
  18. compare-to-zero:
    "int(value) % int(arg) == 0" can be simplified to "not int(value) % int(arg)" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/template/defaultfilters.py#L839
  19. compare-to-zero:
    "token_type == 0" can be simplified to "not token_type" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/template/base.py#L474
  20. compare-to-zero:
    "i == 0" can be simplified to "not i" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/template/defaulttags.py#L213
  21. compare-to-zero:
    "start == 0" can be simplified to "not start" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/base/operations.py#L703
  22. compare-to-zero:
    "end == 0" can be simplified to "not end" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/base/operations.py#L714
  23. compare-to-zero:
    "count == 0" can be simplified to "not count" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/base/features.py#L376
  24. compare-to-zero:
    "braces_deep == 0" can be simplified to "not braces_deep" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/sqlite3/introspection.py#L183
  25. compare-to-zero:
    "value == 0" can be simplified to "not value" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/mysql/operations.py#L249
  26. compare-to-zero:
    "scale == 0" can be simplified to "not scale" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/oracle/introspection.py#L54
  27. compare-to-zero:
    "scale == 0" can be simplified to "not scale" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/oracle/base.py#L445
  28. compare-to-zero:
    "precision == 0" can be simplified to "not precision" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/oracle/base.py#L459
  29. compare-to-zero:
    "i == 0" can be simplified to "not i" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/migrations/autodetector.py#L1676
  30. compare-to-zero:
    "i == 0" can be simplified to "not i" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/migrations/autodetector.py#L1681
  31. compare-to-zero:
    "self.start.value == 0" can be simplified to "not self.start.value" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/expressions.py#L1820
  32. compare-to-zero:
    "self.end.value == 0" can be simplified to "not self.end.value" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/expressions.py#L1827
  33. compare-to-zero:
    "pos == 0" can be simplified to "not pos" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/query.py#L1646
  34. compare-to-zero:
    "self.low_mark != 0" can be simplified to "self.low_mark" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/query.py#L2064
  35. compare-to-zero:
    "pos == 0" can be simplified to "not pos" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/query.py#L2298
  36. compare-to-zero:
    "empty_needed == 0" can be simplified to "not empty_needed" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/where.py#L159
  37. compare-to-zero:
    "full_needed == 0" can be simplified to "not full_needed" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/where.py#L164
  38. compare-to-zero:
    "self.query.alias_refcount[a] == 0" can be simplified to "not self.query.alias_refcount[a]" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/compiler.py#L62
  39. compare-to-zero:
    "seen_from == 0" can be simplified to "not seen_from" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/related.py#L1570
  40. compare-to-zero:
    "seen_to == 0" can be simplified to "not seen_to" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/related.py#L1570
  41. compare-to-zero:
    "real_count != 0" can be simplified to "real_count" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/test/testcases.py#L661
  42. compare-to-zero:
    "real_count != 0" can be simplified to "real_count" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/test/testcases.py#L1078
  43. compare-to-zero:
    "self.port == 0" can be simplified to "not self.port" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/test/testcases.py#L1783
  44. compare-to-zero:
    "round(abs(self.val - other), self.places) == 0" can be simplified to "not round(abs(self.val - other), self.places)" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/test/utils.py#L67
  45. compare-to-zero:
    "timeout == 0" can be simplified to "not timeout" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/middleware/cache.py#L113
  46. compare-to-zero:
    "s == 0" can be simplified to "not s" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/signing.py#L65
  47. compare-to-zero:
    "self.count == 0" can be simplified to "not self.count" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/paginator.py#L99
  48. compare-to-zero:
    "self.paginator.count == 0" can be simplified to "not self.paginator.count" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/paginator.py#L209
  49. compare-to-zero:
    "timeout == 0" can be simplified to "not timeout" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/redis.py#L90
  50. compare-to-zero:
    "timeout == 0" can be simplified to "not timeout" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/redis.py#L105
  51. compare-to-zero:
    "self._cull_frequency == 0" can be simplified to "not self._cull_frequency" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/locmem.py#L92
  52. compare-to-zero:
    "int(timeout) == 0" can be simplified to "not int(timeout)" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/memcached.py#L53
  53. compare-to-zero:
    "timeout == 0" can be simplified to "not timeout" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/memcached.py#L163
  54. compare-to-zero:
    "timeout == 0" can be simplified to "not timeout" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/base.py#L92
  55. compare-to-zero:
    "self._cull_frequency == 0" can be simplified to "not self._cull_frequency" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/filebased.py#L108
  56. compare-to-zero:
    "self._cull_frequency == 0" can be simplified to "not self._cull_frequency" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/db.py#L258
  57. compare-to-zero:
    "size == 0" can be simplified to "not size" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/handlers/wsgi.py#L26
  58. compare-to-zero:
    "visible_issue_count == 0" can be simplified to "not visible_issue_count" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/management/base.py#L537
  59. compare-to-zero:
    "s_opt.nargs != 0" can be simplified to "s_opt.nargs" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/management/__init__.py#L333
  60. compare-to-zero:
    "len(leaf_migration_nodes) == 0" can be simplified to "not len(leaf_migration_nodes)" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/management/commands/makemigrations.py#L268
  61. compare-to-zero:
    "i == 0" can be simplified to "not i" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/management/commands/compilemessages.py#L174
  62. compare-to-zero:
    "objects_in_fixture == 0" can be simplified to "not objects_in_fixture" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/management/commands/loaddata.py#L274
  63. compare-to-zero:
    "unmatched_open_brackets == 0" can be simplified to "not unmatched_open_brackets" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/admindocs/utils.py#L181
  64. compare-to-zero:
    "num_feat % progress_interval == 0" can be simplified to "not num_feat % progress_interval" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/utils/layermapping.py#L682
  65. compare-to-zero:
    "z != 0.0" can be simplified to "z" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/db/models/functions.py#L493
  66. compare-to-zero:
    "s == 0" can be simplified to "not s" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/geos/geometry.py#L363
  67. compare-to-zero:
    "index == 0" can be simplified to "not index" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/geos/point.py#L109
  68. compare-to-zero:
    "index == 0" can be simplified to "not index" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/geos/polygon.py#L139
  69. compare-to-zero:
    "result == 0" can be simplified to "not result" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/geos/prototypes/errcheck.py#L53
  70. compare-to-zero:
    "result == 0" can be simplified to "not result" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/geos/prototypes/coordseq.py#L10
  71. compare-to-zero:
    "expiry == 0" can be simplified to "not expiry" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/sessions/backends/base.py#L287
  72. compare-to-zero:
    "delta.days == 0" can be simplified to "not delta.days" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/humanize/templatetags/humanize.py#L187
  73. compare-to-zero:
    "delta.days != 0" can be simplified to "delta.days" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/humanize/templatetags/humanize.py#L289
  74. compare-to-zero:
    "delta.seconds == 0" can be simplified to "not delta.seconds" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/humanize/templatetags/humanize.py#L295
  75. compare-to-zero:
    "delta.days != 0" can be simplified to "delta.days" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/humanize/templatetags/humanize.py#L307
  76. compare-to-zero:
    "delta.seconds == 0" can be simplified to "not delta.seconds" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/humanize/templatetags/humanize.py#L313
  77. compare-to-zero:
    "i == 0" can be simplified to "not i" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/admin/helpers.py#L153
  78. compare-to-zero:
    "i == 0" can be simplified to "not i" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/admin/helpers.py#L156
  79. compare-to-zero:
    "len(bits) % 2 == 0" can be simplified to "not len(bits) % 2" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/flatpages/templatetags/flatpages.py#L81
  80. compare-to-zero:
    "self._content_length == 0" can be simplified to "not self._content_length" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/http/multipartparser.py#L127
  81. compare-to-zero:
    "remaining != 0" can be simplified to "remaining" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/http/multipartparser.py#L275
  82. compare-to-zero:
    "remaining != 0" can be simplified to "remaining" as 0 is falsey
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/http/multipartparser.py#L414

The following messages are no longer emitted:

  1. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/timesince.py#L65
  2. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/timesince.py#L79
  3. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/timesince.py#L88
  4. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/baseconv.py#L99
  5. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/lorem_ipsum.py#L262
  6. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/regex_helper.py#L166
  7. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/http.py#L184
  8. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/text.py#L50
  9. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/text.py#L52
  10. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/text.py#L105
  11. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/module_loading.py#L13
  12. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/inspect.py#L69
  13. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/dateformat.py#L154
  14. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/dateformat.py#L154
  15. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/dateformat.py#L156
  16. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/version.py#L33
  17. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/version.py#L48
  18. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/numberformat.py#L34
  19. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/utils/formats.py#L212
  20. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/template/defaultfilters.py#L839
  21. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/template/base.py#L474
  22. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/template/defaulttags.py#L213
  23. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/template/defaulttags.py#L1051
  24. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/views/debug.py#L179
  25. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/forms/widgets.py#L551
  26. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/forms/widgets.py#L566
  27. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/forms/fields.py#L667
  28. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/base/operations.py#L703
  29. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/base/operations.py#L714
  30. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/base/features.py#L376
  31. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/base/creation.py#L69
  32. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/base/creation.py#L86
  33. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/sqlite3/introspection.py#L183
  34. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/mysql/operations.py#L249
  35. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/oracle/introspection.py#L54
  36. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/oracle/base.py#L377
  37. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/oracle/base.py#L445
  38. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/backends/oracle/base.py#L459
  39. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/migrations/autodetector.py#L444
  40. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/migrations/autodetector.py#L451
  41. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/migrations/autodetector.py#L1676
  42. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/migrations/autodetector.py#L1681
  43. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/migrations/migration.py#L121
  44. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/migrations/migration.py#L182
  45. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/migrations/executor.py#L333
  46. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/expressions.py#L1567
  47. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/expressions.py#L1567
  48. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/expressions.py#L1820
  49. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/expressions.py#L1827
  50. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/query_utils.py#L56
  51. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/options.py#L853
  52. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/options.py#L906
  53. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/query.py#L347
  54. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/query.py#L1466
  55. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/query.py#L1646
  56. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/query.py#L2064
  57. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/query.py#L2298
  58. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/where.py#L159
  59. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/where.py#L164
  60. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/sql/compiler.py#L62
  61. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/related_descriptors.py#L1286
  62. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/related.py#L1570
  63. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/related.py#L1570
  64. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/__init__.py#L1878
  65. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/__init__.py#L1882
  66. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/__init__.py#L2148
  67. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/__init__.py#L2313
  68. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/__init__.py#L2317
  69. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/__init__.py#L2453
  70. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/db/models/fields/__init__.py#L2455
  71. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/conf/__init__.py#L213
  72. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/test/testcases.py#L661
  73. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/test/testcases.py#L1078
  74. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/test/testcases.py#L1783
  75. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/test/utils.py#L67
  76. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/test/runner.py#L827
  77. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/middleware/cache.py#L113
  78. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/signing.py#L65
  79. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/paginator.py#L99
  80. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/paginator.py#L209
  81. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/redis.py#L90
  82. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/redis.py#L105
  83. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/locmem.py#L92
  84. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/memcached.py#L53
  85. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/memcached.py#L163
  86. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/base.py#L92
  87. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/filebased.py#L108
  88. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/cache/backends/db.py#L258
  89. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/handlers/wsgi.py#L26
  90. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/management/base.py#L537
  91. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/management/__init__.py#L333
  92. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/management/commands/makemigrations.py#L268
  93. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/management/commands/compilemessages.py#L174
  94. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/core/management/commands/loaddata.py#L274
  95. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/admindocs/utils.py#L181
  96. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/utils/layermapping.py#L682
  97. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/db/models/fields.py#L285
  98. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/db/models/functions.py#L493
  99. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/geos/geometry.py#L363
  100. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/geos/point.py#L109
  101. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/geos/polygon.py#L139
  102. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/geos/prototypes/errcheck.py#L53
  103. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/gis/geos/prototypes/coordseq.py#L10
  104. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/sessions/backends/base.py#L287
  105. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/humanize/templatetags/humanize.py#L187
  106. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/humanize/templatetags/humanize.py#L289
  107. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/humanize/templatetags/humanize.py#L295
  108. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/humanize/templatetags/humanize.py#L307
  109. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/humanize/templatetags/humanize.py#L313
  110. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/admin/widgets.py#L543
  111. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/admin/helpers.py#L153
  112. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/admin/helpers.py#L156
  113. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/admin/views/main.py#L558
  114. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/postgres/operations.py#L179
  115. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/postgres/operations.py#L191
  116. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/contrib/flatpages/templatetags/flatpages.py#L81
  117. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/http/multipartparser.py#L127
  118. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/http/multipartparser.py#L275
  119. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/django/django/blob/444b6da7cc229a58a2c476a52e45233001dc7073/django/http/multipartparser.py#L414

Effect on flask:
The following messages are now emitted:

  1. compare-to-zero:
    "port == 0" can be simplified to "not port" as 0 is falsey
    https://github.com/pallets/flask/blob/cc66213e579d6b35d9951c21b685d0078f373c44/src/flask/app.py#L1175
  2. compare-to-zero:
    "total_found == 0" can be simplified to "not total_found" as 0 is falsey
    https://github.com/pallets/flask/blob/cc66213e579d6b35d9951c21b685d0078f373c44/src/flask/debughelpers.py#L143

The following messages are no longer emitted:

  1. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/pallets/flask/blob/cc66213e579d6b35d9951c21b685d0078f373c44/src/flask/app.py#L1175
  2. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/pallets/flask/blob/cc66213e579d6b35d9951c21b685d0078f373c44/src/flask/debughelpers.py#L143
  3. compare-to-zero:
    Avoid comparisons to zero
    https://github.com/pallets/flask/blob/cc66213e579d6b35d9951c21b685d0078f373c44/src/flask/json/provider.py#L291

Effect on pandas:
The following messages are now emitted:

  1. compare-to-zero:
    "p.returncode != 0" can be simplified to "p.returncode" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/_version.py#L100
  2. compare-to-zero:
    "rc != 0" can be simplified to "rc" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/_version.py#L247
  3. compare-to-zero:
    "dow == 0" can be simplified to "not dow" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/tseries/holiday.py#L59
  4. compare-to-zero:
    "days % 7 == 0" can be simplified to "not days % 7" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/tseries/frequencies.py#L347
  5. compare-to-zero:
    "self.mdiffs[0] % 3 == 0" can be simplified to "not self.mdiffs[0] % 3" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/tseries/frequencies.py#L373
  6. compare-to-zero:
    "weekdays == 0" can be simplified to "not weekdays" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/tseries/frequencies.py#L407
  7. compare-to-zero:
    "len(week_of_months) == 0" can be simplified to "not len(week_of_months)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/tseries/frequencies.py#L426
  8. compare-to-zero:
    "us % mult == 0" can be simplified to "not us % mult" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/tseries/frequencies.py#L443
  9. compare-to-zero:
    "len(nona) == 0" can be simplified to "not len(nona)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/_testing/__init__.py#L847
  10. compare-to-zero:
    "len(keys) == 0" can be simplified to "not len(keys)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/_config/config.py#L118
  11. compare-to-zero:
    "nargs % 2 != 0" can be simplified to "nargs % 2" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/_config/config.py#L145
  12. compare-to-zero:
    "len(keys) == 0" can be simplified to "not len(keys)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/_config/config.py#L177
  13. compare-to-zero:
    "len(keys) == 0" can be simplified to "not len(keys)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/_config/config.py#L192
  14. compare-to-zero:
    "len(args) % 2 != 0" can be simplified to "len(args) % 2" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/_config/config.py#L434
  15. compare-to-zero:
    "axis_number == 0" can be simplified to "not axis_number" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L550
  16. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L1307
  17. compare-to-zero:
    "axis_int == 0" can be simplified to "not axis_int" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L1714
  18. compare-to-zero:
    "axis_int == 0" can be simplified to "not axis_int" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L1718
  19. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L1792
  20. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L1850
  21. compare-to-zero:
    "len(self._get_axis(a)) == 0" can be simplified to "not len(self._get_axis(a))" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L1988
  22. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L3956
  23. compare-to-zero:
    "axis != 0" can be simplified to "axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L3998
  24. compare-to-zero:
    "n == 0" can be simplified to "not n" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L5546
  25. compare-to-zero:
    "len(self.index) == 0" can be simplified to "not len(self.index)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L8814
  26. compare-to-zero:
    "len(self.index) == 0" can be simplified to "not len(self.index)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L8887
  27. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L9372
  28. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L9492
  29. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L9573
  30. compare-to-zero:
    "periods == 0" can be simplified to "not periods" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/generic.py#L9999
  31. compare-to-zero:
    "len(arrays) == 0" can be simplified to "not len(arrays)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L2246
  32. compare-to-zero:
    "length == 0" can be simplified to "not length" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L2246
  33. compare-to-zero:
    "nrows == 0" can be simplified to "not nrows" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L2254
  34. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L3661
  35. compare-to-zero:
    "periods != 0" can be simplified to "periods" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L5625
  36. compare-to-zero:
    "periods != 0" can be simplified to "periods" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L5655
  37. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L7352
  38. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L7407
  39. compare-to-zero:
    "periods != 0" can be simplified to "periods" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L9059
  40. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L10338
  41. compare-to-zero:
    "len(frame._get_axis(axis)) == 0" can be simplified to "not len(frame._get_axis(axis))" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L10438
  42. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L10545
  43. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L10566
  44. compare-to-zero:
    "len(self) == 0" can be simplified to "not len(self)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L10566
  45. compare-to-zero:
    "axis_num == 0" can be simplified to "not axis_num" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L10746
  46. compare-to-zero:
    "len(self) == 0" can be simplified to "not len(self)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L10992
  47. compare-to-zero:
    "len(data.columns) == 0" can be simplified to "not len(data.columns)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L11005
  48. compare-to-zero:
    "len(data) == 0" can be simplified to "not len(data)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/frame.py#L11038
  49. compare-to-zero:
    "data.ndim == 0" can be simplified to "not data.ndim" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/construction.py#L532
  50. compare-to-zero:
    "len(data) == 0" can be simplified to "not len(data)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/construction.py#L620
  51. compare-to-zero:
    "getattr(result, 'ndim', 0) == 0" can be simplified to "not getattr(result, 'ndim', 0)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/construction.py#L698
  52. compare-to-zero:
    "varr.size == 0" can be simplified to "not varr.size" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/construction.py#L796
  53. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/sample.py#L37
  54. compare-to-zero:
    "n % 1 != 0" can be simplified to "n % 1" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/sample.py#L99
  55. compare-to-zero:
    "weight_sum != 0" can be simplified to "weight_sum" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/sample.py#L146
  56. compare-to-zero:
    "values.size == 0" can be simplified to "not values.size" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/nanops.py#L134
  57. compare-to-zero:
    "count == 0" can be simplified to "not count" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/nanops.py#L715
  58. compare-to-zero:
    "values.shape[axis] == 0" can be simplified to "not values.shape[axis]" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/nanops.py#L1060
  59. compare-to-zero:
    "values.size == 0" can be simplified to "not values.size" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/nanops.py#L1060
  60. compare-to-zero:
    "m2 == 0" can be simplified to "not m2" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/nanops.py#L1249
  61. compare-to-zero:
    "m2 == 0" can be simplified to "not m2" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/nanops.py#L1252
  62. compare-to-zero:
    "denominator == 0" can be simplified to "not denominator" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/nanops.py#L1339
  63. compare-to-zero:
    "denominator == 0" can be simplified to "not denominator" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/nanops.py#L1350
  64. compare-to-zero:
    "len(ax) == 0" can be simplified to "not len(ax)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/resample.py#L1679
  65. compare-to-zero:
    "len(obj.index) == 0" can be simplified to "not len(obj.index)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/resample.py#L2157
  66. compare-to-zero:
    "len(index) != 0" can be simplified to "len(index)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/resample.py#L2184
  67. compare-to-zero:
    "lshape[i] == 0" can be simplified to "not lshape[i]" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/sorting.py#L178
  68. compare-to-zero:
    "len(values) == 0" can be simplified to "not len(values)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/missing.py#L189
  69. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/missing.py#L815
  70. compare-to-zero:
    "axis != 0" can be simplified to "axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/missing.py#L819
  71. compare-to-zero:
    "(~invalid[:limit + 1]).cumsum() == 0" can be simplified to "not (~invalid[:limit + 1]).cumsum()" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/missing.py#L966
  72. compare-to-zero:
    "fw_limit == 0" can be simplified to "not fw_limit" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/missing.py#L972
  73. compare-to-zero:
    "bw_limit == 0" can be simplified to "not bw_limit" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/missing.py#L979
  74. compare-to-zero:
    "fw_limit == 0" can be simplified to "not fw_limit" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/missing.py#L986
  75. compare-to-zero:
    "len(mapper) == 0" can be simplified to "not len(mapper)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/base.py#L848
  76. compare-to-zero:
    "obj.start == 0" can be simplified to "not obj.start" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/common.py#L324
  77. compare-to-zero:
    "axis == 0" can be simplified to "not axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L83
  78. compare-to-zero:
    "len(func) == 0" can be simplified to "not len(func)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L254
  79. compare-to-zero:
    "self.axis != 0" can be simplified to "self.axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L463
  80. compare-to-zero:
    "len(args) == 0" can be simplified to "not len(args)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L542
  81. compare-to-zero:
    "len([kwarg for kwarg in kwargs if kwarg not in ['axis']]) == 0" can be simplified to "not len([kwarg for kwarg in kwargs if kwarg not in ['axis']])" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L543
  82. compare-to-zero:
    "len(self.columns) == 0" can be simplified to "not len(self.columns)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L627
  83. compare-to-zero:
    "len(self.index) == 0" can be simplified to "not len(self.index)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L627
  84. compare-to-zero:
    "self.axis == 0" can be simplified to "not self.axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L660
  85. compare-to-zero:
    "self.axis == 0" can be simplified to "not self.axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L705
  86. compare-to-zero:
    "len(results) == 0" can be simplified to "not len(results)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L817
  87. compare-to-zero:
    "len(obj) == 0" can be simplified to "not len(obj)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/apply.py#L998
  88. compare-to-zero:
    "obj.columns.size == 0" can be simplified to "not obj.columns.size" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/describe.py#L156
  89. compare-to-zero:
    "len(data.columns) == 0" can be simplified to "not len(data.columns)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/describe.py#L184
  90. compare-to-zero:
    "objcounts != 0" can be simplified to "objcounts" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/describe.py#L256
  91. compare-to-zero:
    "objcounts != 0" can be simplified to "objcounts" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/describe.py#L288
  92. compare-to-zero:
    "result._values == 0" can be simplified to "not result._values" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/algorithms.py#L938
  93. compare-to-zero:
    "axis != 0" can be simplified to "axis" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/algorithms.py#L1686
  94. compare-to-zero:
    "len(newkey) == 0" can be simplified to "not len(newkey)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/indexing.py#L735
  95. compare-to-zero:
    "len(newkey) == 0" can be simplified to "not len(newkey)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/indexing.py#L753
  96. compare-to-zero:
    "len(newkey) == 0" can be simplified to "not len(newkey)" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/indexing.py#L764
  97. compare-to-zero:
    "0 != lplane_indexer" can be simplified to "lplane_indexer" as 0 is falsey
    https://github.com/pandas-dev/pandas/blob/0b931173c842a3476646b627422cf943d15288f6/pandas/core/indexing.py#L1841
  98. compare-to-zero:
    *"lplane_indexer ==...

This comment was truncated because GitHub allows only 65536 characters in a comment.

This comment was generated for commit cd5a1bb

Copy link
Member

@mbyrnepr2 mbyrnepr2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ‘

@Pierre-Sassoulas Pierre-Sassoulas merged commit a1b7020 into pylint-dev:main Nov 7, 2022
@Pierre-Sassoulas Pierre-Sassoulas deleted the more-actionnable-message-for-compare-to-zΓ©ro branch November 7, 2022 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation πŸ“— Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news πŸ”‡ This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants