From 82a046cec4f675ac2b609f4cc6b2874789578634 Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Thu, 14 Feb 2019 01:50:33 +0900 Subject: [PATCH] Bump hacking to 1.1.0 Ignore W504 and F405 by configurations. Reasons of disabling them are explained as comments in tox.ini. They are already ignored in the horizon repository and AFAICT it is not easy to avoid them in horizon plugins as well. Fixes the following new error: * E123 closing bracket does not match indentation of opening bracket's line Change-Id: Ic2154fff3b90cebbfba86deb8cf832232682d347 --- .../dashboards/project/vpn/workflows.py | 2 +- test-requirements.txt | 2 +- tox.ini | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/neutron_vpnaas_dashboard/dashboards/project/vpn/workflows.py b/neutron_vpnaas_dashboard/dashboards/project/vpn/workflows.py index 36cf298..c898ecc 100644 --- a/neutron_vpnaas_dashboard/dashboards/project/vpn/workflows.py +++ b/neutron_vpnaas_dashboard/dashboards/project/vpn/workflows.py @@ -153,7 +153,7 @@ class AddEndpointGroupAction(workflows.Action): 'class': 'switched', 'data-switch-on': 'type', 'data-type-subnet': _("External System Subnets"), - }), + }), help_text=_("Local subnet(s). " "This field is valid if type is Subnet"),) diff --git a/test-requirements.txt b/test-requirements.txt index bcdedd6..e55e4bc 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,7 +3,7 @@ # process, which may cause wedges in the gate later. # Hacking should appear first in case something else depends on pep8 -hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0 +hacking>=1.1.0 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 flake8-import-order==0.13 # LGPLv3 diff --git a/tox.ini b/tox.ini index b76dcc6..969085a 100644 --- a/tox.ini +++ b/tox.ini @@ -64,7 +64,13 @@ exclude = .venv,.git,.tox,dist,*lib/python*,*egg,build,node_modules,.tmp # Enable the following hacking rules which are disabled by default # H203 Use assertIs(Not)None to check for None # H904 Delay string interpolations at logging calls -enable-extensions=H203,H904 +enable-extensions = H203,H904 +# W504 line break after binary operator +# (W503 and W504 are incompatible and we need to choose one of them. +# Existing codes follows W503, so we disable W504.) +# F405 TEMPLATES may be undefined, or defined from star imports +# (because it is not easy to avoid this in openstack_dashboard.test.settings) +ignore = W504,F405 max-complexity = 20 # flake8-import-order configurations