pep8: Don't override '_' symbol

Fix pep8 warning F402 "import '_' from line 51 shadowed by loop
variable".

Change-Id: I139060ff5d298a8b0f0f8e529a5737478fb5daf5
This commit is contained in:
Victor Stinner 2015-08-16 11:18:49 +02:00
parent c7eb589c6c
commit 183508710d
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -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