diff options
author | Marti Raudsepp <marti@juffo.org> | 2022-10-12 14:25:10 +0300 |
---|---|---|
committer | Asif Saif Uddin <auvipy@gmail.com> | 2022-10-12 20:47:19 +0600 |
commit | bfec7faf8d2c7956b35a56b5c93152e4511554d7 (patch) | |
tree | 82e8aa808acd8a2ac5c79f4bbfadf5ee19595466 | |
parent | 3a49533bc283eb03dae772ca79a6aa4f1c68f083 (diff) | |
download | kombu-bfec7faf8d2c7956b35a56b5c93152e4511554d7.tar.gz |
Fix errors from flake8 lint
Python's `del` is a statement, not a function, and doesn't need
parenthesis.
-rw-r--r-- | kombu/__init__.py | 4 | ||||
-rw-r--r-- | t/unit/test_pools.py | 2 | ||||
-rw-r--r-- | t/unit/transport/test_memory.py | 4 | ||||
-rw-r--r-- | t/unit/transport/test_pyro.py | 4 | ||||
-rw-r--r-- | t/unit/transport/virtual/test_base.py | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/kombu/__init__.py b/kombu/__init__.py index 7d922dcb..f1332472 100644 --- a/kombu/__init__.py +++ b/kombu/__init__.py @@ -26,8 +26,8 @@ _temp = cast(re.Match, re.match( r'(\d+)\.(\d+).(\d+)(.+)?', __version__)).groups() VERSION = version_info = version_info_t( int(_temp[0]), int(_temp[1]), int(_temp[2]), _temp[3] or '', '') -del(_temp) -del(re) +del _temp +del re STATICA_HACK = True globals()['kcah_acitats'[::-1].upper()] = False diff --git a/t/unit/test_pools.py b/t/unit/test_pools.py index 12c045ac..1557da95 100644 --- a/t/unit/test_pools.py +++ b/t/unit/test_pools.py @@ -141,7 +141,7 @@ class test_PoolGroup: def test_delitem(self): g = self.MyGroup() g['foo'] - del(g['foo']) + del g['foo'] assert 'foo' not in g def test_Connections(self): diff --git a/t/unit/transport/test_memory.py b/t/unit/transport/test_memory.py index 537ec01f..c707d34c 100644 --- a/t/unit/transport/test_memory.py +++ b/t/unit/transport/test_memory.py @@ -133,8 +133,8 @@ class test_MemoryTransport: with pytest.raises(socket.timeout): self.c.drain_events(timeout=0.1) - del(c1) # so pyflakes doesn't complain. - del(c2) + del c1 # so pyflakes doesn't complain. + del c2 def test_drain_events_unregistered_queue(self): c1 = self.c.channel() diff --git a/t/unit/transport/test_pyro.py b/t/unit/transport/test_pyro.py index b0ec4be4..258abc9e 100644 --- a/t/unit/transport/test_pyro.py +++ b/t/unit/transport/test_pyro.py @@ -61,8 +61,8 @@ class test_PyroTransport: with pytest.raises(socket.timeout): self.c.drain_events(timeout=0.1) - del(c1) # so pyflakes doesn't complain. - del(c2) + del c1 # so pyflakes doesn't complain. + del c2 @pytest.mark.skip("requires running Pyro nameserver and Kombu Broker") def test_drain_events_unregistered_queue(self): diff --git a/t/unit/transport/virtual/test_base.py b/t/unit/transport/virtual/test_base.py index 04972cce..124e19dd 100644 --- a/t/unit/transport/virtual/test_base.py +++ b/t/unit/transport/virtual/test_base.py @@ -582,8 +582,8 @@ class test_Transport: assert len(self.transport.channels) == 2 self.transport.close_connection(self.transport) assert not self.transport.channels - del(c1) # so pyflakes doesn't complain - del(c2) + del c1 # so pyflakes doesn't complain + del c2 def test_create_channel(self): """Ensure create_channel can create channels successfully.""" |