pylint icon indicating copy to clipboard operation
pylint copied to clipboard

Add ``consider-using-augmented-assign`` checker

Open DanielNoord opened this issue 1 year ago • 12 comments

  • [x] Write a good description on what the PR does.
  • [x] Create a news fragment with towncrier create <IssueNumber>.<type> which will be included in the changelog. <type> can be one of: new_check, removed_check, extension, false_positive, false_negative, bugfix, other, internal. If necessary you can write details or offer examples on how the new change is supposed to work.
  • [x] If you used multiple emails or multiple names when contributing, add your mails and preferred name in script/.contributors_aliases.json

Type of Changes

Type
:sparkles: New feature

Description

Closes https://github.com/PyCQA/pylint/issues/3391

Based around the work by @clavedeluna in https://github.com/PyCQA/pylint/pull/7509. But to make this checker work I had to add some additional checking.

Let's see what the primer thinks of this! 😰

DanielNoord avatar Sep 22 '22 12:09 DanielNoord

Something is up with the caches of the primer. Seems to have to do with a bump in the Python versions used by the runner that is happening in between the creation of the cache and the calling to the cache.

Let's see if all things return back to normal after the run on main has completed and we can start a new primer run on this branch.

DanielNoord avatar Sep 22 '22 12:09 DanielNoord

Pull Request Test Coverage Report for Build 3107823195

  • 38 of 42 (90.48%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.01%) to 95.315%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pylint/checkers/utils.py 32 36 88.89%
<!-- Total: 38 42
Totals Coverage Status
Change from base Build 3105240153: -0.01%
Covered Lines: 17109
Relevant Lines: 17950

💛 - Coveralls

coveralls avatar Sep 22 '22 12:09 coveralls

🤖 Effect of this PR on checked open source code: 🤖

Effect on astroid: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/objects.py#L293
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/manager.py#L258
  3. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/nodes/scoped_nodes/scoped_nodes.py#L558
  4. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/nodes/scoped_nodes/scoped_nodes.py#L567
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/brain/brain_dataclasses.py#L209
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/brain/brain_dataclasses.py#L210

Effect on black: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/black/init.py#L1018
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/black/comments.py#L189
  3. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/literals.py#L51
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/tokenize.py#L481
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/tokenize.py#L482
  6. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/pgen.py#L372

Effect on django: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/templatetags/i18n.py#L190
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/options.py#L1843
  3. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/helpers.py#L98
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/helpers.py#L459
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/postgres/search.py#L208
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/postgres/search.py#L257
  7. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/postgres/search.py#L305
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/test/utils.py#L596
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/test/utils.py#L598
  10. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/test/utils.py#L697
  11. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/test/utils.py#L698
  12. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/middleware/security.py#L41
  13. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/middleware/security.py#L43
  14. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/signing.py#L72
  15. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/files/base.py#L89
  16. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/handlers/asgi.py#L95
  17. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/management/templates.py#L367
  18. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/management/commands/compilemessages.py#L78
  19. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/http/request.py#L247
  20. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/http/multipartparser.py#L468
  21. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/options.py#L248
  22. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L1575
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L2039
  24. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L2177
  25. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L2178
  26. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/related.py#L358
  27. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/json.py#L458
  28. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/json.py#L460
  29. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/init.py#L967
  30. consider-using-augmented-assign: Use '^=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/query.py#L1535
  31. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/query.py#L2053
  32. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/compiler.py#L2027
  33. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/base/schema.py#L1000
  34. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/oracle/introspection.py#L169
  35. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/oracle/base.py#L531
  36. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/models.py#L319
  37. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/widgets.py#L210
  38. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/widgets.py#L902
  39. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/widgets.py#L948
  40. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/forms.py#L495
  41. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/urls/base.py#L73
  42. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/datetime_safe.py#L98
  43. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/datetime_safe.py#L101
  44. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/duration.py#L10
  45. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/duration.py#L13
  46. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/timezone.py#L337
  47. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/numberformat.py#L84
  48. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/baseconv.py#L105
  49. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/html.py#L356
  50. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/html.py#L365
  51. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/http.py#L186
  52. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/translation/init.py#L152
  53. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/template/library.py#L223

Effect on pandas: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/compat/numpy/function.py#L99
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/compat/numpy/function.py#L158
  3. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/compat/numpy/function.py#L192
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/compat/numpy/function.py#L221
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/compat/numpy/function.py#L325
  6. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1606
  7. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1646
  8. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1674
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexing/multiindex/test_setitem.py#L225
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/extension/test_external_block.py#L31
  11. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/series/test_arithmetic.py#L780
  12. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/series/indexing/test_setitem.py#L918
  13. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/scalar/timestamp/test_timezones.py#L257
  14. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/io/formats/test_format.py#L1535
  15. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/strings/test_api.py#L139
  16. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/window/test_expanding.py#L272
  17. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/window/test_rolling.py#L1473
  18. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/transform/test_transform.py#L932
  19. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/transform/test_transform.py#L933
  20. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/aggregate/test_other.py#L523
  21. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexes/ranges/test_range.py#L148
  22. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexes/ranges/test_range.py#L150
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexes/datetimes/test_timezones.py#L709
  24. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/frame/test_constructors.py#L3148
  25. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/frame/methods/test_reindex.py#L1187
  26. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_month.py#L616
  27. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L179
  28. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L337
  29. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L423
  30. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L428
  31. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L629
  32. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_offsets.py#L1053
  33. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_offsets.py#L1057
  34. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/frame.py#L10623
  35. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/frame.py#L10624
  36. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/sample.py#L147
  37. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/resample.py#L503
  38. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/algorithms.py#L1367
  39. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/boolean.py#L218
  40. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/boolean.py#L225
  41. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/string_arrow.py#L393
  42. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/period.py#L1103
  43. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/masked.py#L597
  44. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/masked.py#L599
  45. consider-using-augmented-assign: Use '^=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/masked.py#L823
  46. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1740
  47. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1741
  48. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1742
  49. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/tools/datetimes.py#L606
  50. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/tools/datetimes.py#L651
  51. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/rolling.py#L885
  52. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/rolling.py#L886
  53. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/rolling.py#L887
  54. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/numba_.py#L151
  55. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/numba_.py#L158
  56. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L3135
  57. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L3510
  58. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L4124
  59. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L4185
  60. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/indexes/datetimes.py#L823
  61. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/indexes/datetimes.py#L824
  62. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/indexes/multi.py#L3539
  63. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/_testing/init.py#L378
  64. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L2656
  65. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L4167
  66. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L4395
  67. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/html.py#L875
  68. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/stata.py#L2493
  69. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/stata.py#L3285
  70. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/formats/xml.py#L224
  71. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/formats/xml.py#L227
  72. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/formats/format.py#L420
  73. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/formats/format.py#L1722
  74. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/json/_normalize.py#L528
  75. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/parsers/readers.py#L1920
  76. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/util/_exceptions.py#L24
  77. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/plotting/_matplotlib/core.py#L1689

Effect on psycopg: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psycopg/psycopg/blob/f9f97c69583626ee9fbef0776608ffd3f40c56d9/psycopg/psycopg/_encodings.py#L153

Effect on pygame: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '<<=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L754
  2. consider-using-augmented-assign: Use '<<=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L755
  3. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L756
  4. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L758
  5. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L759
  6. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L761
  7. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L763
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/camera.py#L147
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/camera.py#L152
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/midi.py#L605
  11. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/draw_py.py#L231

Effect on pytest: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/pytester.py#L1506
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/pytester.py#L1509
  3. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/logging.py#L627
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/recwarn.py#L84
  5. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/assertion/util.py#L364

Effect on sentry: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L213
  2. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L217
  3. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L220
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/runner/commands/devserver.py#L211
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/runner/commands/devservices.py#L106
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/models/debugfile.py#L592
  7. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/deletions/base.py#L209
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/filestore/gcs.py#L90
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/release_health/metrics_sessions_v2.py#L251
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/release_health/metrics.py#L909
  11. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/release_health/metrics.py#L982
  12. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/db/models/base.py#L29
  13. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/processing/realtime_metrics/redis.py#L171
  14. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/processing/realtime_metrics/redis.py#L205
  15. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/auth/helper.py#L230
  16. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/lang/javascript/errorlocale.py#L85
  17. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/utils/numbers.py#L42
  18. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/utils/snuba.py#L428
  19. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/snuba/query_subscription_consumer.py#L178
  20. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/snuba/discover.py#L118
  21. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/paginator.py#L403
  22. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/event_search.py#L203
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/event_search.py#L229
  24. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/base.py#L136
  25. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/bases/organization_events.py#L208
  26. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/endpoints/organization_events_facets_performance.py#L319

This comment was generated for commit be5463a682e34800c00847c8cf483a13b8d07f22

github-actions[bot] avatar Sep 22 '22 13:09 github-actions[bot]

Noticed the first Django result is a false positive (string formatting, not modulo): https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/templatetags/i18n.py#L190

jacobtylerwalls avatar Sep 22 '22 13:09 jacobtylerwalls

Noticed the first Django result is a false positive (string formatting, not modulo): https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/templatetags/i18n.py#L190

Thanks for checking! PRs like these are where the primer shines 😄

DanielNoord avatar Sep 22 '22 13:09 DanielNoord

Noticed the first Django result is a false positive (string formatting, not modulo): https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/templatetags/i18n.py#L190

Can't just simplify that as well though?

❯ python
Python 3.10.0 (default, Oct 27 2021, 16:20:25) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> x = "%s"
>>> x % "my_string"
'my_string'
>>> x %= "my_string"
>>> x
'my_string'

DanielNoord avatar Sep 22 '22 13:09 DanielNoord

Ah, that might not be a false positive then. Still I'm worried there could be something lurking with incomplete string formatting (e.g. TypeError: not all arguments converted...). A couple tests would be nice just to show this isn't a worry.

jacobtylerwalls avatar Sep 22 '22 13:09 jacobtylerwalls

Ah, that might not be a false positive then. Still I'm worried there could be something lurking with incomplete string formatting (e.g. TypeError: not all arguments converted...). A couple tests would be nice just to show this isn't a worry.

I think those would be an issue without the augmented assign as well, but you're right: better safe than sorry!

DanielNoord avatar Sep 22 '22 13:09 DanielNoord

🤖 Effect of this PR on checked open source code: 🤖

Effect on astroid: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/objects.py#L293
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/manager.py#L258
  3. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/nodes/scoped_nodes/scoped_nodes.py#L558
  4. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/nodes/scoped_nodes/scoped_nodes.py#L567
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/brain/brain_dataclasses.py#L209
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/brain/brain_dataclasses.py#L210

Effect on black: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/black/init.py#L1018
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/black/comments.py#L189
  3. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/literals.py#L51
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/tokenize.py#L481
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/tokenize.py#L482
  6. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/pgen.py#L372

Effect on django: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/templatetags/i18n.py#L190
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/options.py#L1843
  3. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/helpers.py#L98
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/helpers.py#L459
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/postgres/search.py#L208
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/postgres/search.py#L257
  7. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/postgres/search.py#L305
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/test/utils.py#L596
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/test/utils.py#L598
  10. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/test/utils.py#L697
  11. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/test/utils.py#L698
  12. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/middleware/security.py#L41
  13. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/middleware/security.py#L43
  14. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/signing.py#L72
  15. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/files/base.py#L89
  16. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/handlers/asgi.py#L95
  17. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/management/templates.py#L367
  18. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/management/commands/compilemessages.py#L78
  19. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/http/request.py#L247
  20. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/http/multipartparser.py#L468
  21. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/options.py#L248
  22. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L1575
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L2039
  24. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L2177
  25. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L2178
  26. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/related.py#L358
  27. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/json.py#L458
  28. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/json.py#L460
  29. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/init.py#L967
  30. consider-using-augmented-assign: Use '^=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/query.py#L1535
  31. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/query.py#L2053
  32. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/compiler.py#L2027
  33. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/base/schema.py#L1000
  34. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/oracle/introspection.py#L169
  35. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/oracle/base.py#L531
  36. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/models.py#L319
  37. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/widgets.py#L210
  38. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/widgets.py#L902
  39. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/widgets.py#L948
  40. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/forms.py#L495
  41. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/urls/base.py#L73
  42. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/datetime_safe.py#L98
  43. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/datetime_safe.py#L101
  44. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/duration.py#L10
  45. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/duration.py#L13
  46. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/timezone.py#L337
  47. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/numberformat.py#L84
  48. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/baseconv.py#L105
  49. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/html.py#L356
  50. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/html.py#L365
  51. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/http.py#L186
  52. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/translation/init.py#L152
  53. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/template/library.py#L223

Effect on pandas: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/compat/numpy/function.py#L99
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/compat/numpy/function.py#L158
  3. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/compat/numpy/function.py#L192
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/compat/numpy/function.py#L221
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/compat/numpy/function.py#L325
  6. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1606
  7. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1646
  8. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1674
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexing/multiindex/test_setitem.py#L225
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/extension/test_external_block.py#L31
  11. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/series/test_arithmetic.py#L780
  12. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/series/indexing/test_setitem.py#L918
  13. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/scalar/timestamp/test_timezones.py#L257
  14. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/io/formats/test_format.py#L1535
  15. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/strings/test_api.py#L139
  16. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/window/test_expanding.py#L272
  17. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/window/test_rolling.py#L1473
  18. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/transform/test_transform.py#L932
  19. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/transform/test_transform.py#L933
  20. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/aggregate/test_other.py#L523
  21. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexes/ranges/test_range.py#L148
  22. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexes/ranges/test_range.py#L150
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexes/datetimes/test_timezones.py#L709
  24. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/frame/test_constructors.py#L3148
  25. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/frame/methods/test_reindex.py#L1187
  26. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_month.py#L616
  27. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L179
  28. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L337
  29. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L423
  30. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L428
  31. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L629
  32. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_offsets.py#L1053
  33. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_offsets.py#L1057
  34. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/frame.py#L10623
  35. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/frame.py#L10624
  36. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/sample.py#L147
  37. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/resample.py#L503
  38. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/algorithms.py#L1367
  39. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/boolean.py#L218
  40. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/boolean.py#L225
  41. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/string_arrow.py#L393
  42. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/period.py#L1103
  43. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/masked.py#L597
  44. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/masked.py#L599
  45. consider-using-augmented-assign: Use '^=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/masked.py#L823
  46. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1740
  47. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1741
  48. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1742
  49. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/tools/datetimes.py#L606
  50. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/tools/datetimes.py#L651
  51. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/rolling.py#L885
  52. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/rolling.py#L886
  53. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/rolling.py#L887
  54. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/numba_.py#L151
  55. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/numba_.py#L158
  56. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L3135
  57. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L3510
  58. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L4124
  59. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L4185
  60. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/indexes/datetimes.py#L823
  61. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/indexes/datetimes.py#L824
  62. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/indexes/multi.py#L3539
  63. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/_testing/init.py#L378
  64. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L2656
  65. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L4167
  66. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L4395
  67. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/html.py#L875
  68. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/stata.py#L2493
  69. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/stata.py#L3285
  70. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/formats/xml.py#L224
  71. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/formats/xml.py#L227
  72. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/formats/format.py#L420
  73. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/formats/format.py#L1722
  74. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/json/_normalize.py#L528
  75. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/parsers/readers.py#L1920
  76. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/util/_exceptions.py#L24
  77. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/plotting/_matplotlib/core.py#L1689

Effect on psycopg: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psycopg/psycopg/blob/f9f97c69583626ee9fbef0776608ffd3f40c56d9/psycopg/psycopg/_encodings.py#L153

Effect on pygame: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '<<=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L754
  2. consider-using-augmented-assign: Use '<<=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L755
  3. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L756
  4. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L758
  5. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L759
  6. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L761
  7. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L763
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/camera.py#L147
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/camera.py#L152
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/midi.py#L605
  11. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/draw_py.py#L231

Effect on pytest: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/pytester.py#L1506
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/pytester.py#L1509
  3. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/logging.py#L627
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/recwarn.py#L84
  5. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/assertion/util.py#L364

Effect on sentry: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L213
  2. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L217
  3. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L220
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/runner/commands/devserver.py#L211
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/runner/commands/devservices.py#L106
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/models/debugfile.py#L592
  7. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/deletions/base.py#L209
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/filestore/gcs.py#L90
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/release_health/metrics_sessions_v2.py#L251
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/release_health/metrics.py#L909
  11. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/release_health/metrics.py#L982
  12. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/db/models/base.py#L29
  13. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/processing/realtime_metrics/redis.py#L171
  14. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/processing/realtime_metrics/redis.py#L205
  15. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/auth/helper.py#L230
  16. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/lang/javascript/errorlocale.py#L85
  17. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/utils/numbers.py#L42
  18. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/utils/snuba.py#L428
  19. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/snuba/query_subscription_consumer.py#L178
  20. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/snuba/discover.py#L118
  21. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/paginator.py#L403
  22. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/event_search.py#L203
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/event_search.py#L229
  24. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/base.py#L136
  25. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/bases/organization_events.py#L208
  26. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/endpoints/organization_events_facets_performance.py#L319

This comment was generated for commit 3e32b311707f2db9476d633870085a2e6182efb5

github-actions[bot] avatar Sep 22 '22 15:09 github-actions[bot]

🤖 Effect of this PR on checked open source code: 🤖

Effect on astroid: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/objects.py#L293
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/manager.py#L258
  3. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/nodes/scoped_nodes/scoped_nodes.py#L558
  4. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/nodes/scoped_nodes/scoped_nodes.py#L567

Effect on black: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/black/init.py#L1018
  2. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/literals.py#L51
  3. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/tokenize.py#L481
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/tokenize.py#L482
  5. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/pgen.py#L372

Effect on django: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/templatetags/i18n.py#L190
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/options.py#L1843
  3. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/helpers.py#L98
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/helpers.py#L459
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/test/utils.py#L596
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/middleware/security.py#L41
  7. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/middleware/security.py#L43
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/management/commands/compilemessages.py#L78
  9. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/options.py#L248
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L1575
  11. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L2039
  12. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/related.py#L358
  13. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/json.py#L458
  14. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/json.py#L460
  15. consider-using-augmented-assign: Use '^=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/query.py#L1535
  16. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/query.py#L2053
  17. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/compiler.py#L2027
  18. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/base/schema.py#L1000
  19. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/oracle/introspection.py#L169
  20. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/oracle/base.py#L531
  21. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/models.py#L319
  22. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/widgets.py#L210
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/widgets.py#L948
  24. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/forms.py#L495
  25. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/urls/base.py#L73
  26. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/datetime_safe.py#L98
  27. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/datetime_safe.py#L101
  28. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/duration.py#L10
  29. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/duration.py#L13
  30. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/timezone.py#L337
  31. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/numberformat.py#L84
  32. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/translation/init.py#L152

Effect on pandas: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1606
  2. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1646
  3. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1674
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexing/multiindex/test_setitem.py#L225
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/extension/test_external_block.py#L31
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/series/test_arithmetic.py#L780
  7. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/series/indexing/test_setitem.py#L918
  8. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/io/formats/test_format.py#L1535
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/window/test_expanding.py#L272
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/window/test_rolling.py#L1473
  11. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/transform/test_transform.py#L932
  12. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/transform/test_transform.py#L933
  13. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/aggregate/test_other.py#L523
  14. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexes/ranges/test_range.py#L148
  15. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexes/ranges/test_range.py#L150
  16. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/frame/test_constructors.py#L3148
  17. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/frame/methods/test_reindex.py#L1187
  18. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_month.py#L616
  19. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L179
  20. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L337
  21. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L423
  22. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L428
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L629
  24. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_offsets.py#L1053
  25. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/frame.py#L10623
  26. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/frame.py#L10624
  27. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/sample.py#L147
  28. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/resample.py#L503
  29. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/boolean.py#L218
  30. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/boolean.py#L225
  31. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/string_arrow.py#L393
  32. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/period.py#L1103
  33. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/masked.py#L597
  34. consider-using-augmented-assign: Use '^=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/masked.py#L823
  35. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1740
  36. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1741
  37. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1742
  38. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/tools/datetimes.py#L606
  39. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/tools/datetimes.py#L651
  40. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/numba_.py#L158
  41. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L3135
  42. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L4124
  43. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L4185
  44. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/_testing/init.py#L378
  45. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L2656
  46. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L4167
  47. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L4395
  48. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/formats/format.py#L1722
  49. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/parsers/readers.py#L1920
  50. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/util/_exceptions.py#L24
  51. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/plotting/_matplotlib/core.py#L1689

Effect on pygame: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '<<=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L754
  2. consider-using-augmented-assign: Use '<<=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L755
  3. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L756
  4. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L758
  5. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L759
  6. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L761
  7. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L763
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/midi.py#L605
  9. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/draw_py.py#L231

Effect on pytest: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/assertion/util.py#L364

Effect on sentry: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L213
  2. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L217
  3. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L220
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/runner/commands/devserver.py#L211
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/runner/commands/devservices.py#L106
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/models/debugfile.py#L592
  7. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/deletions/base.py#L209
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/filestore/gcs.py#L90
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/release_health/metrics.py#L909
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/release_health/metrics.py#L982
  11. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/processing/realtime_metrics/redis.py#L171
  12. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/processing/realtime_metrics/redis.py#L205
  13. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/auth/helper.py#L230
  14. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/utils/numbers.py#L42
  15. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/utils/snuba.py#L428
  16. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/snuba/query_subscription_consumer.py#L178
  17. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/snuba/discover.py#L118
  18. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/paginator.py#L403
  19. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/event_search.py#L203
  20. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/event_search.py#L229
  21. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/base.py#L136
  22. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/bases/organization_events.py#L208
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/endpoints/organization_events_facets_performance.py#L319

This comment was generated for commit 104935d53c06c7179d23b3a8d07b5f25ef18bcb4

github-actions[bot] avatar Sep 22 '22 16:09 github-actions[bot]

I don't understand astroid 1, but that seems to be caused by incorrect inference of filled_args. I checked all other primer messages and they all seem to make sense to me.

I think this is ready for review!

DanielNoord avatar Sep 22 '22 16:09 DanielNoord

There's a badly formatted message for black; Use '=' to do an augmented assign directly* (https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/literals.py#L51). It also happen for pandas here : https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/io/formats/test_format.py#L1535, so probably for all *.

This is incorrect formatting from GitHub. See test output for correct examples with *=.

DanielNoord avatar Sep 22 '22 18:09 DanielNoord

🤖 Effect of this PR on checked open source code: 🤖

Effect on astroid: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/objects.py#L293
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/manager.py#L258
  3. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/nodes/scoped_nodes/scoped_nodes.py#L558
  4. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/PyCQA/astroid/blob/b867508d903719378e439ec48686565a497ec312/astroid/nodes/scoped_nodes/scoped_nodes.py#L567

Effect on black: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/black/init.py#L1018
  2. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/literals.py#L51
  3. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/tokenize.py#L481
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/tokenize.py#L482
  5. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/psf/black/blob/6ae8457a8628345c59fed22c58728ffa258a3e76/src/blib2to3/pgen2/pgen.py#L372

Effect on django: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/templatetags/i18n.py#L190
  2. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/options.py#L1843
  3. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/helpers.py#L98
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/contrib/admin/helpers.py#L459
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/test/utils.py#L596
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/middleware/security.py#L41
  7. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/middleware/security.py#L43
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/core/management/commands/compilemessages.py#L78
  9. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/options.py#L248
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L1575
  11. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/query.py#L2039
  12. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/related.py#L358
  13. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/json.py#L458
  14. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/fields/json.py#L460
  15. consider-using-augmented-assign: Use '^=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/query.py#L1535
  16. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/query.py#L2053
  17. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/models/sql/compiler.py#L2027
  18. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/base/schema.py#L1000
  19. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/oracle/introspection.py#L169
  20. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/db/backends/oracle/base.py#L531
  21. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/models.py#L319
  22. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/widgets.py#L210
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/widgets.py#L948
  24. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/forms/forms.py#L495
  25. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/urls/base.py#L73
  26. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/datetime_safe.py#L98
  27. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/datetime_safe.py#L101
  28. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/duration.py#L10
  29. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/duration.py#L13
  30. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/timezone.py#L337
  31. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/numberformat.py#L84
  32. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/django/django/blob/37a13cc92d51d5a57b42240b9a5dd250648efa24/django/utils/translation/init.py#L152

Effect on pandas: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1606
  2. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1646
  3. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/arithmetic/test_timedelta64.py#L1674
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexing/multiindex/test_setitem.py#L225
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/extension/test_external_block.py#L31
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/series/test_arithmetic.py#L780
  7. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/series/indexing/test_setitem.py#L918
  8. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/io/formats/test_format.py#L1535
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/window/test_expanding.py#L272
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/window/test_rolling.py#L1473
  11. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/transform/test_transform.py#L932
  12. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/transform/test_transform.py#L933
  13. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/groupby/aggregate/test_other.py#L523
  14. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexes/ranges/test_range.py#L148
  15. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/indexes/ranges/test_range.py#L150
  16. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/frame/test_constructors.py#L3148
  17. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/frame/methods/test_reindex.py#L1187
  18. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_month.py#L616
  19. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L179
  20. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L337
  21. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L423
  22. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L428
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_fiscal.py#L629
  24. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/tests/tseries/offsets/test_offsets.py#L1053
  25. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/frame.py#L10623
  26. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/frame.py#L10624
  27. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/sample.py#L147
  28. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/resample.py#L503
  29. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/boolean.py#L218
  30. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/boolean.py#L225
  31. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/string_arrow.py#L393
  32. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/period.py#L1103
  33. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/masked.py#L597
  34. consider-using-augmented-assign: Use '^=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/arrays/masked.py#L823
  35. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1740
  36. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1741
  37. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/reshape/merge.py#L1742
  38. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/tools/datetimes.py#L606
  39. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/tools/datetimes.py#L651
  40. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/window/numba_.py#L158
  41. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L3135
  42. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L4124
  43. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/core/groupby/groupby.py#L4185
  44. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/_testing/init.py#L378
  45. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L2656
  46. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L4167
  47. consider-using-augmented-assign: Use '&=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/pytables.py#L4395
  48. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/formats/format.py#L1722
  49. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/io/parsers/readers.py#L1920
  50. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/util/_exceptions.py#L24
  51. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pandas-dev/pandas/blob/71fc89cd515c3c19230fbab64e979118858b808a/pandas/plotting/_matplotlib/core.py#L1689

Effect on pygame: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '<<=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L754
  2. consider-using-augmented-assign: Use '<<=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L755
  3. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L756
  4. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L758
  5. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L759
  6. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L761
  7. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/cursors.py#L763
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/midi.py#L605
  9. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/pygame/pygame/blob/7e6f48306f624debac9cb2731bb9adc5a762a5c6/src_py/draw_py.py#L231

Effect on pytest: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/pytest-dev/pytest/blob/59b8ec3ce11f8e94d924dc97bc1e14f380824b54/src/_pytest/assertion/util.py#L364

Effect on sentry: The following messages are now emitted:

  1. consider-using-augmented-assign: Use '/=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L213
  2. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L217
  3. consider-using-augmented-assign: Use '%=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/templatetags/sentry_helpers.py#L220
  4. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/runner/commands/devserver.py#L211
  5. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/runner/commands/devservices.py#L106
  6. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/models/debugfile.py#L592
  7. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/deletions/base.py#L209
  8. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/filestore/gcs.py#L90
  9. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/release_health/metrics.py#L909
  10. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/release_health/metrics.py#L982
  11. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/processing/realtime_metrics/redis.py#L171
  12. consider-using-augmented-assign: Use '-=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/processing/realtime_metrics/redis.py#L205
  13. consider-using-augmented-assign: Use '|=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/auth/helper.py#L230
  14. consider-using-augmented-assign: Use '=' to do an augmented assign directly* https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/utils/numbers.py#L42
  15. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/utils/snuba.py#L428
  16. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/snuba/query_subscription_consumer.py#L178
  17. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/snuba/discover.py#L118
  18. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/paginator.py#L403
  19. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/event_search.py#L203
  20. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/event_search.py#L229
  21. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/base.py#L136
  22. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/bases/organization_events.py#L208
  23. consider-using-augmented-assign: Use '+=' to do an augmented assign directly https://github.com/getsentry/sentry/blob/f9bf16e7d663c780c1e0c0378ae92f2a93aa326b/src/sentry/api/endpoints/organization_events_facets_performance.py#L319

This comment was generated for commit f5861b17f5da3d6de6dc1a6bd9b09f752b742745

github-actions[bot] avatar Sep 22 '22 19:09 github-actions[bot]

I haven't followed the discussion around this check so it might have come up already.

Why was this not implemented as an optional extension?

From what I can tell there is no obvious benefit to using the augmented assignment over the regular one. IMO it just creates a lot of unnecessary noise. Similar checks like the one for assignment expressions are also optional.

cdce8p avatar Oct 11 '22 09:10 cdce8p

I think @cdce8p has a point here.

Pierre-Sassoulas avatar Oct 11 '22 10:10 Pierre-Sassoulas

Agreed.

jacobtylerwalls avatar Oct 11 '22 11:10 jacobtylerwalls

Agreed. I'll create a PR when I get the time.

DanielNoord avatar Oct 11 '22 11:10 DanielNoord

See opened issue for follow up question.

DanielNoord avatar Oct 11 '22 11:10 DanielNoord