From bf614900cd18e4e39b2509aa31ac0fca309241fe Mon Sep 17 00:00:00 2001 From: Martin Oemke Date: Sat, 13 Feb 2016 13:10:39 +0100 Subject: [PATCH] Fix pep8 error and enable flake8 options This Patch fixes flake8 error and enables this test for all new patches to tacker-horizon. H701 Empty localization string see https://github.com/openstack-dev/hacking/blob/master/ hacking/checks/localization.py#L109 see OpenStack Style Guidelines http://docs.openstack.org/developer/hacking/ This Patch enables two flake8 options: show-source max-complexity show-source adds output with source code for each error see for max-complexity https://flake8.readthedocs.org/en/latest/ Change-Id: I337846738d53488093d324ebfe1c8b21ce3681f6 Closes-Bug: #1531680 --- .../openstack_dashboard/dashboards/nfv/vnfmanager/forms.py | 3 ++- tox.ini | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/forms.py b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/forms.py index 49feccc..aff8aaf 100644 --- a/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/forms.py +++ b/tacker_horizon/openstack_dashboard/dashboards/nfv/vnfmanager/forms.py @@ -147,4 +147,5 @@ class DeployVNF(forms.SelfHandlingForm): return True except Exception as e: exceptions.handle(request, - _(e.message)) + _('Failed to create VNF: %s') % + e.message) diff --git a/tox.ini b/tox.ini index 18ca48f..a3e7973 100644 --- a/tox.ini +++ b/tox.ini @@ -47,5 +47,5 @@ setenv = NOSE_WITH_COVERAGE=1 commands = {posargs} [flake8] -# H701 Empty localization string -ignore = H701 +show-source = True +max-complexity = 20