From 183508710d011ec30ebba2186c58fd28d449e4bb Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 16 Aug 2015 11:18:49 +0200 Subject: [PATCH] pep8: Don't override '_' symbol Fix pep8 warning F402 "import '_' from line 51 shadowed by loop variable". Change-Id: I139060ff5d298a8b0f0f8e529a5737478fb5daf5 --- swift/common/memcached.py | 2 +- tox.ini | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/swift/common/memcached.py b/swift/common/memcached.py index d367b80c89..f3d0eae5d6 100644 --- a/swift/common/memcached.py +++ b/swift/common/memcached.py @@ -443,7 +443,7 @@ class MemcacheRing(object): with Timeout(self._io_timeout): sock.sendall(msg) # Wait for the set to complete - for _ in range(len(mapping)): + for line in range(len(mapping)): fp.readline() self._return_conn(server, fp, sock) return diff --git a/tox.ini b/tox.ini index 53d3bf78a8..14fbe0b180 100644 --- a/tox.ini +++ b/tox.ini @@ -55,7 +55,6 @@ commands = bandit -c bandit.yaml -r swift bin -n 5 -p gate [flake8] # it's not a bug that we aren't using all of hacking, ignore: -# F402: import '_' from line 51 shadowed by loop variable # F812: list comprehension redefines ... # H101: Use TODO(NAME) # H202: assertRaises Exception too broad @@ -69,6 +68,6 @@ commands = bandit -c bandit.yaml -r swift bin -n 5 -p gate # H405: multi line docstring summary not separated with an empty line # H501: Do not use self.__dict__ for string formatting # H703: Multiple positional placeholders -ignore = F402,F812,H101,H202,H233,H234,H301,H306,H401,H403,H404,H405,H501,H703 +ignore = F812,H101,H202,H233,H234,H301,H306,H401,H403,H404,H405,H501,H703 exclude = .venv,.tox,dist,doc,*egg show-source = True