Skip to content

[compare-to-empty-string] More actionnable and understandable message #7726

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

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented Nov 7, 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. We have to use " as string delimiter because node as string have ' as string delimiter.

Closes #5234 (the changelog will be added in #6870)

@Pierre-Sassoulas Pierre-Sassoulas added Documentation πŸ“— Skip news πŸ”‡ This change does not require a changelog entry labels Nov 7, 2022
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the more-actionnable-message-for-compare-to-empty-string branch 2 times, most recently from a673657 to 2c16cae Compare November 7, 2022 09:30
@coveralls
Copy link

coveralls commented Nov 7, 2022

Pull Request Test Coverage Report for Build 3431301544

  • 10 of 10 (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.395%

Totals Coverage Status
Change from base Build 3431285216: 0.007%
Covered Lines: 17275
Relevant Lines: 18109

πŸ’› - Coveralls

@Pierre-Sassoulas Pierre-Sassoulas force-pushed the more-actionnable-message-for-compare-to-empty-string branch from 2c16cae to e88afd6 Compare November 7, 2022 09:40
@github-actions

This comment has been minimized.

for ops_idx in range(len(ops) - 2):
op_1: nodes.NodeNG | None = ops[ops_idx]
op_2: str = ops[ops_idx + 1] # type: ignore[assignment]
op_3: nodes.NodeNG | None = ops[ops_idx + 2]
error_detected = False

if op_1 is None or op_3 is None or op_2 not in _operators:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if op_1 is None or op_3 is None or op_2 not in _operators:
if None in [op_1, op_3] or op_2 not in _operators:

Copy link
Member Author

Choose a reason for hiding this comment

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

mypy does not understand this I'm going to revert

Copy link
Member

@mbyrnepr2 mbyrnepr2 Nov 9, 2022

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Interesting consideration from the issue you linked: python/mypy#2980 (comment)

mbyrnepr2
mbyrnepr2 previously approved these changes Nov 9, 2022
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.

I like it. One small comment about readability which may make it a bit simpler.

@github-actions

This comment has been minimized.

We have to use " as string delimiter because node as string have ' as
string delimiter.
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the more-actionnable-message-for-compare-to-empty-string branch from bc4ace3 to 47797b5 Compare November 9, 2022 19:41
@Pierre-Sassoulas Pierre-Sassoulas enabled auto-merge (squash) November 9, 2022 20:04
@Pierre-Sassoulas Pierre-Sassoulas merged commit a0461a4 into pylint-dev:main Nov 9, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 9, 2022

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

Effect on astroid:
The following messages are now emitted:

  1. compare-to-empty-string:
    "parts[0] == ''" can be simplified to "not parts[0]" as an empty string is falsey
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/modutils.py#L424
  2. compare-to-empty-string:
    "parts[starti] == ''" can be simplified to "not parts[starti]" as an empty string is falsey
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/modutils.py#L430
  3. use-dict-literal:
    Consider using '{"node": self, "unknown": node, "assign_path": assign_path, "context": context, ... }' instead of a call to 'dict'.
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/protocols.py#L297
  4. use-dict-literal:
    Consider using '{"node": self, "unknown": node, "assign_path": assign_path, "context": context, ... }' instead of a call to 'dict'.
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/protocols.py#L304
  5. use-dict-literal:
    Consider using '{"node": self, "unknown": node, "assign_path": assign_path, "context": context, ... }' instead of a call to 'dict'.
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/protocols.py#L457
  6. use-dict-literal:
    Consider using '{"node": self, "unknown": node, "assign_path": assign_path, "context": context, ... }' instead of a call to 'dict'.
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/protocols.py#L530
  7. use-dict-literal:
    Consider using '{"node": self, "unknown": node, "assign_path": assign_path, "context": context, ... }' instead of a call to 'dict'.
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/protocols.py#L646
  8. use-dict-literal:
    Consider using '{"node": stmt, "context": context}' instead of a call to 'dict'.
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/nodes/node_classes.py#L94
  9. use-dict-literal:
    Consider using '{"node": stmt, "context": context}' instead of a call to 'dict'.
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/nodes/node_classes.py#L99
  10. use-dict-literal:
    Consider using '{"node": stmt, "context": context}' instead of a call to 'dict'.
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/nodes/node_classes.py#L107

The following messages are no longer emitted:

  1. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/modutils.py#L424
  2. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/PyCQA/astroid/blob/6cf238d089cf4b6753c94cfc089b4a47487711e5/astroid/modutils.py#L430

Effect on black:
The following messages are now emitted:

  1. compare-to-empty-string:
    "LL[string_idx - 1].value == ''" can be simplified to "not LL[string_idx - 1].value" as an empty string is falsey
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/trans.py#L973
  2. compare-to-empty-string:
    "N.value == ''" can be simplified to "not N.value" as an empty string is falsey
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/trans.py#L1005
  3. compare-to-empty-string:
    "first.value == ''" can be simplified to "not first.value" as an empty string is falsey
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/nodes.py#L748
  4. compare-to-empty-string:
    "last.value == ''" can be simplified to "not last.value" as an empty string is falsey
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/nodes.py#L751
  5. compare-to-empty-string:
    "leaf.value == ''" can be simplified to "not leaf.value" as an empty string is falsey
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/nodes.py#L760
  6. compare-to-empty-string:
    "leaf.value == ''" can be simplified to "not leaf.value" as an empty string is falsey
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/nodes.py#L764

The following messages are no longer emitted:

  1. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/trans.py#L973
  2. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/trans.py#L1005
  3. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/nodes.py#L748
  4. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/nodes.py#L751
  5. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/nodes.py#L760
  6. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/psf/black/blob/ffaaf4838228c922b586a87f717ed402031fcc0a/src/black/nodes.py#L764

Effect on django:
The following messages are now emitted:

  1. compare-to-empty-string:
    "text == ''" can be simplified to "not text" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/utils/termcolors.py#L49
  2. compare-to-empty-string:
    "number == ''" can be simplified to "not number" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/utils/numberformat.py#L28
  3. compare-to-empty-string:
    "subpath == ''" can be simplified to "not subpath" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/apps/registry.py#L265
  4. compare-to-empty-string:
    "key == ''" can be simplified to "not key" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/views/i18n.py#L280
  5. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/forms/widgets.py#L260
  6. compare-to-empty-string:
    "v == ''" can be simplified to "not v" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/forms/widgets.py#L551
  7. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/forms/widgets.py#L566
  8. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/forms/widgets.py#L744
  9. compare-to-empty-string:
    "y == m == d == ''" can be simplified to "not d" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/forms/widgets.py#L1161
  10. compare-to-empty-string:
    "settings_dict['NAME'] == ''" can be simplified to "not settings_dict['NAME']" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/backends/postgresql/base.py#L171
  11. compare-to-empty-string:
    "lookup_value == ''" can be simplified to "not lookup_value" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/base.py#L1314
  12. compare-to-empty-string:
    "lookup_value == ''" can be simplified to "not lookup_value" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/constraints.py#L317
  13. compare-to-empty-string:
    "lookup.rhs == ''" can be simplified to "not lookup.rhs" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/sql/query.py#L1302
  14. compare-to-empty-string:
    "val == ''" can be simplified to "not val" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/fields/related_descriptors.py#L680
  15. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/fields/related.py#L1139
  16. compare-to-empty-string:
    "self.path != ''" can be simplified to "self.path" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/fields/__init__.py#L1867
  17. compare-to-empty-string:
    "default == ''" can be simplified to "not default" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/fields/__init__.py#L2585
  18. compare-to-empty-string:
    "request_csrf_token == ''" can be simplified to "not request_csrf_token" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/middleware/csrf.py#L382
  19. compare-to-empty-string:
    "salt != ''" can be simplified to "salt" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/auth/hashers.py#L745
  20. compare-to-empty-string:
    "salt != ''" can be simplified to "salt" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/auth/hashers.py#L800
  21. compare-to-empty-string:
    "username == ''" can be simplified to "not username" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/auth/management/commands/createsuperuser.py#L117
  22. compare-to-empty-string:
    "password.strip() == ''" can be simplified to "not password.strip()" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/auth/management/commands/createsuperuser.py#L178
  23. compare-to-empty-string:
    "raw_value == ''" can be simplified to "not raw_value" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/auth/management/commands/createsuperuser.py#L256
  24. compare-to-empty-string:
    "path == ''" can be simplified to "not path" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/staticfiles/views.py#L35
  25. compare-to-empty-string:
    "r.new_path == ''" can be simplified to "not r.new_path" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/redirects/middleware.py#L45
  26. compare-to-empty-string:
    "geo_value == ''" can be simplified to "not geo_value" as an empty string is falsey
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/gis/db/models/proxy.py#L40

The following messages are no longer emitted:

  1. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/utils/termcolors.py#L49
  2. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/utils/numberformat.py#L28
  3. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/apps/registry.py#L265
  4. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/views/i18n.py#L280
  5. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/forms/widgets.py#L260
  6. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/forms/widgets.py#L551
  7. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/forms/widgets.py#L566
  8. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/forms/widgets.py#L744
  9. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/forms/widgets.py#L1161
  10. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/backends/postgresql/base.py#L171
  11. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/base.py#L1314
  12. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/constraints.py#L317
  13. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/sql/query.py#L1302
  14. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/fields/related_descriptors.py#L680
  15. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/fields/related.py#L1139
  16. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/fields/__init__.py#L1867
  17. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/db/models/fields/__init__.py#L2585
  18. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/middleware/csrf.py#L382
  19. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/auth/hashers.py#L745
  20. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/auth/hashers.py#L800
  21. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/auth/management/commands/createsuperuser.py#L117
  22. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/auth/management/commands/createsuperuser.py#L178
  23. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/auth/management/commands/createsuperuser.py#L256
  24. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/staticfiles/views.py#L35
  25. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/redirects/middleware.py#L45
  26. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/django/django/blob/e0fb2a25b973a5e539d908f7f31112fb10622bd4/django/contrib/gis/db/models/proxy.py#L40

Effect on flask:
The following messages are now emitted:

  1. use-dict-literal:
    Consider using '{"key_derivation": self.key_derivation, "digest_method": self.digest_method, ... }' instead of a call to 'dict'.
    https://github.com/pallets/flask/blob/cc66213e579d6b35d9951c21b685d0078f373c44/src/flask/sessions.py#L350

Effect on pandas:
The following messages are now emitted:

  1. compare-to-empty-string:
    "top == ''" can be simplified to "not top" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/frame.py#L3817
  2. compare-to-empty-string:
    "x[start:stop] == ''" can be simplified to "not x[start:stop]" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/strings/object_array.py#L306
  3. compare-to-empty-string:
    "sep == ''" can be simplified to "not sep" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/strings/accessor.py#L3255
  4. compare-to-empty-string:
    "group == ''" can be simplified to "not group" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/strings/accessor.py#L3325
  5. compare-to-empty-string:
    "tz != ''" can be simplified to "tz" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/interchange/from_dataframe.py#L297
  6. compare-to-empty-string:
    "msg != ''" can be simplified to "msg" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/window/common.py#L200
  7. use-dict-literal:
    Consider using '{**_shared_docs}' instead of a call to 'dict'.
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/window/doc.py#L8
  8. compare-to-empty-string:
    "re.compile(to_replace).pattern != ''" can be simplified to "re.compile(to_replace).pattern" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/array_algos/replace.py#L41
  9. compare-to-empty-string:
    "e.strip() != ''" can be simplified to "e.strip()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/computation/eval.py#L302
  10. compare-to-empty-string:
    "'' == empty.str.cat()" can be simplified to "not empty.str.cat()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/strings/test_strings.py#L107
  11. compare-to-empty-string:
    "captured.err == ''" can be simplified to "not captured.err" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/series/test_repr.py#L158
  12. compare-to-empty-string:
    "p.get_label() != ''" can be simplified to "p.get_label()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_misc.py#L304
  13. compare-to-empty-string:
    "p.get_label() != ''" can be simplified to "p.get_label()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_misc.py#L309
  14. compare-to-empty-string:
    "p.get_label() != ''" can be simplified to "p.get_label()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_misc.py#L314
  15. compare-to-empty-string:
    "label == ''" can be simplified to "not label" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_series.py#L235
  16. compare-to-empty-string:
    "label2 == ''" can be simplified to "not label2" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_series.py#L239
  17. compare-to-empty-string:
    "ax.get_xlabel() == ''" can be simplified to "not ax.get_xlabel()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_series.py#L819
  18. compare-to-empty-string:
    "ax.get_ylabel() == ''" can be simplified to "not ax.get_ylabel()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_series.py#L822
  19. compare-to-empty-string:
    "ax.get_legend().get_texts()[0].get_text() == ''" can be simplified to "not ax.get_legend().get_texts()[0].get_text()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/frame/test_frame.py#L1191
  20. compare-to-empty-string:
    "ax.get_ylabel() == ''" can be simplified to "not ax.get_ylabel()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/frame/test_frame.py#L2185
  21. compare-to-empty-string:
    "ax.get_ylabel() == ''" can be simplified to "not ax.get_ylabel()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/frame/test_frame_subplots.py#L507
  22. compare-to-empty-string:
    "captured.err == ''" can be simplified to "not captured.err" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/indexes/datetimes/test_map.py#L29
  23. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/scalar/test_nat.py#L108
  24. compare-to-empty-string:
    "result['B'][2] == ''" can be simplified to "not result['B'][2]" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/parser/test_c_parser_only.py#L251
  25. compare-to-empty-string:
    "quote_char == ''" can be simplified to "not quote_char" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/parser/test_quoting.py#L86
  26. compare-to-empty-string:
    "captured.err == ''" can be simplified to "not captured.err" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/parser/common/test_read_errors.py#L145
  27. use-dict-literal:
    Consider using '{"x": 'A', "y": 'B', "c": 'c', "colormap": cmap}' instead of a call to 'dict'.
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/formats/style/test_matplotlib.py#L300
  28. compare-to-empty-string:
    "x != ''" can be simplified to "x" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/excel/test_readers.py#L463
  29. compare-to-empty-string:
    "x != ''" can be simplified to "x" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/excel/test_readers.py#L465
  30. compare-to-empty-string:
    "df2.x == ''" can be simplified to "not df2.x" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/pytables/test_select.py#L761
  31. compare-to-empty-string:
    "column != ''" can be simplified to "column" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/format.py#L711
  32. compare-to-empty-string:
    "p != ''" can be simplified to "p" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/xml.py#L254
  33. compare-to-empty-string:
    "p == ''" can be simplified to "not p" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/xml.py#L257
  34. compare-to-empty-string:
    "d[col] == ''" can be simplified to "not d[col]" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/xml.py#L309
  35. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/style.py#L1484
  36. compare-to-empty-string:
    "side != ''" can be simplified to "side" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/css.py#L75
  37. compare-to-empty-string:
    "val == ''" can be simplified to "not val" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/css.py#L346
  38. compare-to-empty-string:
    "x != ''" can be simplified to "x" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/excel.py#L689
  39. compare-to-empty-string:
    "x.strip() != ''" can be simplified to "x.strip()" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/style_render.py#L1861
  40. compare-to-empty-string:
    "user_arg != ''" can be simplified to "user_arg" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/style_render.py#L2254
  41. compare-to-empty-string:
    "text == ''" can be simplified to "not text" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/clipboard/__init__.py#L273
  42. compare-to-empty-string:
    "data[-1] == ''" can be simplified to "not data[-1]" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/parsers/base_parser.py#L896
  43. compare-to-empty-string:
    "c == ''" can be simplified to "not c" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/parsers/python_parser.py#L416
  44. compare-to-empty-string:
    "v == ''" can be simplified to "not v" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/parsers/python_parser.py#L1307
  45. compare-to-empty-string:
    "row[i] == ''" can be simplified to "not row[i]" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_util.py#L265
  46. compare-to-empty-string:
    "header_name == ''" can be simplified to "not header_name" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_util.py#L303
  47. compare-to-empty-string:
    "converted_row[-1] == ''" can be simplified to "not converted_row[-1]" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_pyxlsb.py#L94
  48. compare-to-empty-string:
    "x == ''" can be simplified to "not x" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_base.py#L809
  49. compare-to-empty-string:
    "data[row][col] == ''" can be simplified to "not data[row][col]" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_base.py#L835
  50. compare-to-empty-string:
    "converted_row[-1] == ''" can be simplified to "not converted_row[-1]" as an empty string is falsey
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_openpyxl.py#L607

The following messages are no longer emitted:

  1. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/frame.py#L3817
  2. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/strings/object_array.py#L306
  3. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/strings/accessor.py#L3255
  4. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/strings/accessor.py#L3325
  5. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/interchange/from_dataframe.py#L297
  6. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/window/common.py#L200
  7. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/array_algos/replace.py#L41
  8. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/core/computation/eval.py#L302
  9. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/strings/test_strings.py#L107
  10. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/series/test_repr.py#L158
  11. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_misc.py#L304
  12. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_misc.py#L309
  13. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_misc.py#L314
  14. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_series.py#L235
  15. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_series.py#L239
  16. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_series.py#L819
  17. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/test_series.py#L822
  18. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/frame/test_frame.py#L1191
  19. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/frame/test_frame.py#L2185
  20. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/plotting/frame/test_frame_subplots.py#L507
  21. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/indexes/datetimes/test_map.py#L29
  22. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/scalar/test_nat.py#L108
  23. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/parser/test_c_parser_only.py#L251
  24. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/parser/test_quoting.py#L86
  25. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/parser/common/test_read_errors.py#L145
  26. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/excel/test_readers.py#L463
  27. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/excel/test_readers.py#L465
  28. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/tests/io/pytables/test_select.py#L761
  29. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/format.py#L711
  30. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/xml.py#L254
  31. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/xml.py#L257
  32. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/xml.py#L309
  33. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/style.py#L1484
  34. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/css.py#L75
  35. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/css.py#L346
  36. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/excel.py#L689
  37. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/style_render.py#L1861
  38. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/formats/style_render.py#L2254
  39. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/clipboard/__init__.py#L273
  40. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/parsers/base_parser.py#L896
  41. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/parsers/python_parser.py#L416
  42. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/parsers/python_parser.py#L1307
  43. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_util.py#L265
  44. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_util.py#L303
  45. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_pyxlsb.py#L94
  46. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_base.py#L809
  47. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_base.py#L835
  48. compare-to-empty-string:
    Avoid comparisons to empty string
    https://github.com/pandas-dev/pandas/blob/25832bc479dd794c588938b5d650126f9d8d9bff/pandas/io/excel/_openpyxl.py#L607

Effect on pytest:
The following messages are now emitted:

  1. use-dict-literal:
    Consider using '{"getfixture": self.fixture_request.getfixturevalue}' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/doctest.py#L282
  2. use-dict-literal:
    Consider using '{"DONT_ACCEPT_TRUE_FOR_1": doctest.DONT_ACCEPT_TRUE_FOR_1, "DONT_ACCEPT_BLANKLINE": doctest.DONT_ACCEPT_BLANKLINE, ... }' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/doctest.py#L385
  3. use-dict-literal:
    Consider using '{}' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/doctest.py#L752
  4. use-dict-literal:
    Consider using '{"metafunc": metafunc}' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/python.py#L499
  5. use-dict-literal:
    Consider using '{"warning_message": warning_message, "nodeid": nodeid, "when": when, ... }' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/warnings.py#L65
  6. use-dict-literal:
    Consider using '{"plugin": plugin, "manager": self}' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/config/__init__.py#L492
  7. use-dict-literal:
    Consider using '{"parser": self._parser, "pluginmanager": self.pluginmanager}' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/config/__init__.py#L999
  8. use-dict-literal:
    Consider using '{"config": self}' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/config/__init__.py#L1037
  9. use-dict-literal:
    Consider using '{"pluginmanager": self.pluginmanager}' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/config/__init__.py#L1344
  10. use-dict-literal:
    Consider using '{"warning_message": records[0], "when": 'config', "nodeid": '', "location": location, ... }' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/config/__init__.py#L1400
  11. use-dict-literal:
    Consider using '{"black": 30, "red": 31, "green": 32, "yellow": 33, "blue": 34, "purple": 35, ... }' instead of a call to 'dict'.
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/_io/terminalwriter.py#L42

The following messages are no longer emitted:

  1. use-dict-literal:
    Consider using {} instead of dict()
    https://github.com/pytest-dev/pytest/blob/a092b3ab360b1aa56ea35d3303ed33b460144124/src/_pytest/doctest.py#L752

Effect on sentry:
The following messages are now emitted:

  1. use-dict-literal:
    Consider using '{"geoip_lookup": rust_geoip, "max_secs_in_future": MAX_SECS_IN_FUTURE, ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/constants.py#L571
  2. compare-to-empty-string:
    "activity.data['version'] == ''" can be simplified to "not activity.data['version']" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/event_manager.py#L1746
  3. use-dict-literal:
    Consider using '{"start": start, "end": end, "groupby": groupby, "conditions": conditions, ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/utils/snuba.py#L1187
  4. compare-to-empty-string:
    "name == ''" can be simplified to "not name" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/utils/snuba.py#L1288
  5. compare-to-empty-string:
    "key != ''" can be simplified to "key" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/utils/meta.py#L157
  6. use-dict-literal:
    Consider using '{"partition_query": ' AND '.join(partition_query) + (' AND ' if partition_query else ''), ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/utils/query.py#L236
  7. use-dict-literal:
    Consider using '{}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/utils/jwt.py#L74
  8. compare-to-empty-string:
    "x != ''" can be simplified to "x" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/utils/committers.py#L40
  9. compare-to-empty-string:
    "self.raw_value == ''" can be simplified to "not self.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/event_search.py#L373
  10. compare-to-empty-string:
    "self.raw_value == ''" can be simplified to "not self.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/event_search.py#L382
  11. compare-to-empty-string:
    "self.value.raw_value != ''" can be simplified to "self.value.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/event_search.py#L400
  12. compare-to-empty-string:
    "self.value.raw_value == ''" can be simplified to "not self.value.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/event_search.py#L402
  13. use-dict-literal:
    Consider using '{"organization": organization}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/bases/organizationmember.py#L67
  14. use-dict-literal:
    Consider using '{"suggestions": list(get_suggested_updates(SdkSetupState(latest['sdkName'], latest['sdkVersion'], (), ()), index_state, ignore_patch_version=True)), ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/endpoints/organization_sdk_updates.py#L44
  15. compare-to-empty-string:
    "spanOp == ''" can be simplified to "not spanOp" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/endpoints/organization_events_spans_count_histogram.py#L29
  16. use-dict-literal:
    Consider using '{"include_values_seen": True}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/endpoints/project_tags.py#L19
  17. compare-to-empty-string:
    "stats_period == ''" can be simplified to "not stats_period" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/endpoints/project_group_index.py#L83
  18. use-dict-literal:
    Consider using '{}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/helpers/group_index/update.py#L691
  19. compare-to-empty-string:
    "stats_period == ''" can be simplified to "not stats_period" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/helpers/group_index/index.py#L169
  20. compare-to-empty-string:
    "start_key != ''" can be simplified to "start_key" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/serializers/models/group_stream.py#L435
  21. compare-to-empty-string:
    "end_key != ''" can be simplified to "end_key" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/serializers/models/group_stream.py#L436
  22. use-dict-literal:
    Consider using '{"url": f'/organizations/{org_slug}/integrations/{obj.key}/setup/', ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/serializers/models/integration.py#L170
  23. compare-to-empty-string:
    "data == ''" can be simplified to "not data" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/serializers/rest_framework/doc_integration.py#L21
  24. compare-to-empty-string:
    "data == ''" can be simplified to "not data" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/serializers/rest_framework/sentry_app.py#L51
  25. compare-to-empty-string:
    "data == ''" can be simplified to "not data" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/serializers/rest_framework/list.py#L6
  26. compare-to-empty-string:
    "data == ''" can be simplified to "not data" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/fields/empty_decimal.py#L13
  27. compare-to-empty-string:
    "data == ''" can be simplified to "not data" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/fields/empty_decimal.py#L18
  28. compare-to-empty-string:
    "data == ''" can be simplified to "not data" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/fields/empty_integer.py#L13
  29. compare-to-empty-string:
    "data == ''" can be simplified to "not data" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/api/fields/empty_integer.py#L18
  30. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/plugins/bases/issue2.py#L195
  31. compare-to-empty-string:
    "v == ''" can be simplified to "not v" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/release_health/metrics.py#L116
  32. use-dict-literal:
    Consider using '{"constructor": NormalizedUserIpEvent}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/region_to_control/messages.py#L62
  33. use-dict-literal:
    Consider using '{"constructor": NormalizedAuditLogEvent}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/region_to_control/messages.py#L66
  34. use-dict-literal:
    Consider using '{"user_id": user_ip_event.user_id, "ip_address": user_ip_event.ip_address, ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/region_to_control/consumer.py#L109
  35. use-dict-literal:
    Consider using '{"key": redis_key, "limit": limit, "request_uid": request_uid}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/ratelimits/concurrent.py#L53
  36. use-dict-literal:
    Consider using '{"key": key, "request_uid": request_uid}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/ratelimits/concurrent.py#L79
  37. compare-to-empty-string:
    "content == ''" can be simplified to "not content" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/web/frontend/error_page_embed.py#L102
  38. compare-to-empty-string:
    "index == ''" can be simplified to "not index" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/interfaces/stacktrace.py#L494
  39. use-dict-literal:
    Consider using '{"value": original_data}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/db/mixin.py#L54
  40. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/db/models/fields/jsonfield.py#L91
  41. use-dict-literal:
    Consider using '{"by": dict(((key, reverse_resolve_tag_value(self._use_case_id, self._organization_id, value, weak=True)) if groupby_alias_to_groupby_column.get(key) not in NON_RESOLVABLE_TAG_VALUES else (key, value) for (key, value) in tags)), ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/snuba/metrics/query_builder.py#L906
  42. compare-to-empty-string:
    "query.orderby == ''" can be simplified to "not query.orderby" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/migrations/0289_dashboardwidgetquery_convert_orderby_to_field.py#L93
  43. use-dict-literal:
    Consider using '{}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/profiles/task.py#L167
  44. compare-to-empty-string:
    "frames[stack[len(stack) - 2]].get('function', '') == ''" can be simplified to "not frames[stack[len(stack) - 2]].get('function', '')" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/profiles/task.py#L284
  45. compare-to-empty-string:
    "debug_file_id == ''" can be simplified to "not debug_file_id" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/profiles/task.py#L352
  46. compare-to-empty-string:
    "prop != ''" can be simplified to "prop" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/identity/oauth2.py#L55
  47. compare-to-empty-string:
    "response.text == ''" can be simplified to "not response.text" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/shared_integrations/response/base.py#L82
  48. use-dict-literal:
    Consider using '{"data": data}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/models/processingissue.py#L89
  49. use-dict-literal:
    Consider using '{"group": group, "project_id": group.project_id, "linked_type": GroupLink.LinkedType.issue, ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/models/grouplink.py#L27
  50. compare-to-empty-string:
    "self.password == ''" can be simplified to "not self.password" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/models/user.py#L226
  51. use-dict-literal:
    Consider using '{"organization_id": self._release.organization_id, "release_id": self._release.id, ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/models/releasefile.py#L359
  52. use-dict-literal:
    Consider using '{"integration": integration, "organization__organizationintegration__integration": integration, ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/models/integrations/external_issue.py#L27
  53. use-dict-literal:
    Consider using '{"method": str(request.method), "view": view, "response": status_code, ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/middleware/access_log.py#L83
  54. use-dict-literal:
    Consider using '{"host": '%s:%d' % (host, port), "userid": dsn.username, "password": dsn.password, ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/monitoring/queues.py#L37
  55. use-dict-literal:
    Consider using '{}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/tagstore/snuba/backend.py#L599
  56. use-dict-literal:
    Consider using '{"user_id__isnull": False, "user__is_active": True}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/tasks/reports.py#L779
  57. use-dict-literal:
    Consider using '{}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/sentry_metrics/configuration.py#L51
  58. use-dict-literal:
    Consider using '{}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/utils/sync.py#L25
  59. compare-to-empty-string:
    "frame_filename.dir_path != ''" can be simplified to "frame_filename.dir_path" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/utils/code_mapping.py#L132
  60. use-dict-literal:
    Consider using '{"member_set__user": user, "organizationintegration__integration": integration, ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/utils/identities.py#L28
  61. use-dict-literal:
    Consider using '{"id": organization_id}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/utils/identities.py#L34
  62. use-dict-literal:
    Consider using '{"oauth_scopes": sorted(GitlabIdentityProvider.oauth_scopes), "redirect_url": absolute_uri('/extensions/gitlab/setup/'), ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/gitlab/integration.py#L335
  63. use-dict-literal:
    Consider using '{"oauth_scopes": (), "redirect_url": absolute_uri('/extensions/github-enterprise/setup/'), ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/github_enterprise/integration.py#L271
  64. use-dict-literal:
    Consider using '{"user": user, "key": 'issue:defaults', "project": project}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/mixins/issues.py#L168
  65. use-dict-literal:
    Consider using '{"user": user, "key": 'issue:defaults', "project": project}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/mixins/issues.py#L178
  66. use-dict-literal:
    *Consider using '{"jwt": encoded_jwt, *url_params or {}}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/jira/client.py#L71
  67. use-dict-literal:
    Consider using '{"method": method, "path": path, "data": data, "params": params}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/jira/client.py#L73
  68. use-dict-literal:
    Consider using '{"method": method, "path": path, "data": data, "params": params}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/jira_server/client.py#L73
  69. use-dict-literal:
    Consider using '{"external_name": channel_name, "external_id": channel_id}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/slack/views/link_team.py#L132
  70. use-dict-literal:
    *Consider using '{"query": query, *args}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/integrations/slack/unfurl/discover.py#L288
  71. use-dict-literal:
    Consider using '{}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/features/manager.py#L100
  72. use-dict-literal:
    Consider using '{"category": get_path(frame_data, 'data', 'category'), "family": get_behavior_family_for_platform(frame_data.get('platform') or platform), ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/grouping/enhancer/matchers.py#L63
  73. use-dict-literal:
    Consider using '{"ignore_unknown_options": True}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/runner/__init__.py#L91
  74. use-dict-literal:
    Consider using '{"ignore_unknown_options": True, "allow_extra_args": True}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/runner/commands/exec.py#L19
  75. use-dict-literal:
    Consider using '{"email": email, "username": email, "is_superuser": superuser, "is_staff": staff, ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/runner/commands/createuser.py#L109
  76. use-dict-literal:
    Consider using '{"ignore_unknown_options": True, "allow_extra_args": True}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/runner/commands/execfile.py#L8
  77. use-dict-literal:
    Consider using '{"ignore_unknown_options": True}' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/runner/commands/django.py#L6
  78. compare-to-empty-string:
    "token.strip('()') == ''" can be simplified to "not token.strip('()')" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/utils.py#L501
  79. use-dict-literal:
    Consider using '{"start": start, "end": end, "project_ids": [p.id for p in projects], ... }' instead of a call to 'dict'.
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/snuba/executors.py#L697
  80. compare-to-empty-string:
    "aggregate_filter.value.value == ''" can be simplified to "not aggregate_filter.value.value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L112
  81. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L167
  82. compare-to-empty-string:
    "search_filter.value.raw_value == ''" can be simplified to "not search_filter.value.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L198
  83. compare-to-empty-string:
    "search_filter.value.raw_value == ''" can be simplified to "not search_filter.value.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L219
  84. compare-to-empty-string:
    "search_filter.value.raw_value == ''" can be simplified to "not search_filter.value.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L247
  85. compare-to-empty-string:
    "search_filter.value.raw_value == ''" can be simplified to "not search_filter.value.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L265
  86. compare-to-empty-string:
    "search_filter.value.raw_value == ''" can be simplified to "not search_filter.value.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L284
  87. compare-to-empty-string:
    "search_filter.value.raw_value == ''" can be simplified to "not search_filter.value.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L303
  88. compare-to-empty-string:
    "search_filter.value.raw_value == ''" can be simplified to "not search_filter.value.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L630
  89. compare-to-empty-string:
    "search_filter.value.value == ''" can be simplified to "not search_filter.value.value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L668
  90. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L956
  91. compare-to-empty-string:
    "value != ''" can be simplified to "value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/filter.py#L981
  92. compare-to-empty-string:
    "search_filter.value.value == ''" can be simplified to "not search_filter.value.value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/builder/metrics.py#L386
  93. compare-to-empty-string:
    "column == ''" can be simplified to "not column" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/builder/discover.py#L580
  94. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/builder/discover.py#L1140
  95. compare-to-empty-string:
    "search_filter.value.raw_value == ''" can be simplified to "not search_filter.value.raw_value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/builder/discover.py#L1198
  96. compare-to-empty-string:
    "search_filter.value.value == ''" can be simplified to "not search_filter.value.value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/builder/discover.py#L1249
  97. compare-to-empty-string:
    "value == ''" can be simplified to "not value" as an empty string is falsey
    https://github.com/getsentry/sentry/blob/8f53000b026f763fb849c40c7fb05277e22bb2c9/src/sentry/search/events/datasets/metrics.py#L725
  98. compare-to-empty-string:
    *"value == '...

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

This comment was generated for commit 47797b5

@Pierre-Sassoulas Pierre-Sassoulas deleted the more-actionnable-message-for-compare-to-empty-string branch November 10, 2022 20:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation πŸ“— Skip news πŸ”‡ This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

C1901 (compare-to-empty-string) message is not explicit about the problem and the solution
3 participants