From 43e4f50d02b90142c207225eeb0b6ab46ee837cb Mon Sep 17 00:00:00 2001 From: Mark McClain Date: Wed, 11 Jun 2014 21:23:53 -0400 Subject: [PATCH] enable F812 check for flake8 The change removes the shadowed variable in list comprehensions and enables the F812 check Change-Id: If7b4d6f198795565fe0d8e7524b73555e310cd14 Partial-Bug: 1329017 --- neutron/services/vpn/device_drivers/ipsec.py | 4 +--- tox.ini | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/neutron/services/vpn/device_drivers/ipsec.py b/neutron/services/vpn/device_drivers/ipsec.py index a3375fb0e..a7579e27d 100644 --- a/neutron/services/vpn/device_drivers/ipsec.py +++ b/neutron/services/vpn/device_drivers/ipsec.py @@ -692,9 +692,7 @@ class IPsecDriver(device_drivers.DeviceDriver): # Delete any IPSec processes running # VPN that do not have an associated router. - process_ids = [process_id - for process_id in self.processes - if process_id not in router_ids] + process_ids = [pid for pid in self.processes if pid not in router_ids] for process_id in process_ids: self.destroy_router(process_id) self.report_status(context) diff --git a/tox.ini b/tox.ini index 6e57c14ab..442a6348b 100644 --- a/tox.ini +++ b/tox.ini @@ -65,7 +65,7 @@ commands = python setup.py build_sphinx # E128 continuation line under-indented for visual indent # E129 visually indented line with same indent as next logical line # E265 block comment should start with ‘# ‘ -# F812 list comprehension redefines name from line +# H104 file contains nothing but comments # H237 module is removed in Python 3 # H305 imports not grouped correctly # H307 like imports should be grouped together @@ -74,7 +74,7 @@ commands = python setup.py build_sphinx # H405 multi line docstring summary not separated with an empty line # H904 Wrap long lines in parentheses instead of a backslash # TODO(marun) H404 multi line docstring should start with a summary -ignore = E125,E126,E128,E129,E265,F812,H237,H305,H307,H401,H402,H404,H405,H904 +ignore = E125,E126,E128,E129,E265,H237,H305,H307,H401,H402,H404,H405,H904 show-source = true builtins = _ exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios