lincolnloop / python-qrcode

Python QR Code image generator
https://pypi.python.org/pypi/qrcode
Other
4.34k stars 664 forks source link

Increase the usage of augmented assignment statements #243

Open elfring opened 2 years ago

elfring commented 2 years ago

:eyes: Some source code analysis tools can help to find opportunities for improving software components. :thought_balloon: I propose to increase the usage of augmented assignment statements accordingly.

diff --git a/qrcode/util.py b/qrcode/util.py
index a9d7ace..5f5b064 100644
--- a/qrcode/util.py
+++ b/qrcode/util.py
@@ -514,7 +514,7 @@ def create_bytes(buffer, rs_blocks):
         else:
             rsPoly = base.Polynomial([1], 0)
             for i in range(ecCount):
-                rsPoly = rsPoly * base.Polynomial([1, base.gexp(i)], 0)
+                rsPoly *= base.Polynomial([1, base.gexp(i)], 0)

         rawPoly = base.Polynomial(dcdata[r], len(rsPoly) - 1)