Skip to content

Increase the usage of augmented assignment statements #529

Open
@elfring

Description

@elfring

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

diff --git a/tests/unit/ext/test_aiohttp_py35.py b/tests/unit/ext/test_aiohttp_py35.py
index d4fcfc20..bb5fa810 100644
--- a/tests/unit/ext/test_aiohttp_py35.py
+++ b/tests/unit/ext/test_aiohttp_py35.py
@@ -22,7 +22,7 @@ class OtherClassBasedView(web.View):
 @web.middleware
 async def middleware(request, handler):
     resp = await handler(request)
-    resp.text = resp.text + " wink1"
+    resp.text += " wink1"
     return resp
 
 
@@ -30,7 +30,7 @@ def middleware_factory(text):
     @web.middleware
     async def sample_middleware(request, handler):
         resp = await handler(request)
-        resp.text = resp.text + text
+        resp.text += text
         return resp
     return sample_middleware

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions