From 0bd2219c94febe97a9c696775deef66f3683d347 Mon Sep 17 00:00:00 2001 From: "ying.yunlong" Date: Sat, 23 Sep 2017 13:58:25 +0800 Subject: [PATCH] Fix vfc-gvnfm-vnfmgr pep8 E203 issue Change-Id: I827ea28bb892b6c503e4062a5f7e557969a71441 Issue-ID: VFC-443 Signed-off-by: ying.yunlong --- mgr/mgr/pub/utils/enumutil.py | 1 + mgr/mgr/pub/utils/values.py | 2 ++ mgr/mgr/vnfreg/tests.py | 1 + mgr/tox.ini | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mgr/mgr/pub/utils/enumutil.py b/mgr/mgr/pub/utils/enumutil.py index 9656f7d..48e4ffe 100644 --- a/mgr/mgr/pub/utils/enumutil.py +++ b/mgr/mgr/pub/utils/enumutil.py @@ -12,5 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. + def enum(**enums): return type('Enum', (), enums) diff --git a/mgr/mgr/pub/utils/values.py b/mgr/mgr/pub/utils/values.py index 4262e1d..4de2bd4 100644 --- a/mgr/mgr/pub/utils/values.py +++ b/mgr/mgr/pub/utils/values.py @@ -12,6 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + def ignore_case_get(args, key, def_val=""): if not key: return def_val @@ -22,6 +23,7 @@ def ignore_case_get(args, key, def_val=""): return args[old_key] return def_val + def set_opt_val(param, key, val): if val or val is False: param[key] = val diff --git a/mgr/mgr/vnfreg/tests.py b/mgr/mgr/vnfreg/tests.py index c831489..b3ffccc 100644 --- a/mgr/mgr/vnfreg/tests.py +++ b/mgr/mgr/vnfreg/tests.py @@ -21,6 +21,7 @@ from rest_framework import status from mgr.pub.database.models import VnfRegModel from mgr.pub.utils import restcall + class VnfRegTest(unittest.TestCase): def setUp(self): self.client = Client() diff --git a/mgr/tox.ini b/mgr/tox.ini index 1911362..ef3b10c 100644 --- a/mgr/tox.ini +++ b/mgr/tox.ini @@ -6,7 +6,7 @@ skipsdist = true downloadcache = ~/cache/pip [flake8] -ignore = E501,E302,W293,E128,W291 +ignore = E501,W293,E128,W291 [testenv] deps = -r{toxinidir}/requirements.txt -- 2.16.6