From b51f7d4d8c4d6760521d5bc2349911c40823de64 Mon Sep 17 00:00:00 2001 From: Lucas Alvares Gomes Date: Thu, 17 Dec 2015 18:15:15 +0000 Subject: [PATCH] Run flake8 against the python scripts under tools/ and devstack/tools This patch allows flake8 to run against the scripts under tools/ and devstack/tools directories. It also fix the current pep8 errors where it's needed. Change-Id: I3f447564dd528c6efdee10a4a13f1ff1d7e1c3b1 --- devstack/tools/ironic/scripts/configure-vm.py | 13 +++++++++++++ tools/states_to_dot.py | 1 + tox.ini | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/devstack/tools/ironic/scripts/configure-vm.py b/devstack/tools/ironic/scripts/configure-vm.py index 378fcb85ad..2d5a9adf17 100755 --- a/devstack/tools/ironic/scripts/configure-vm.py +++ b/devstack/tools/ironic/scripts/configure-vm.py @@ -1,4 +1,17 @@ #!/usr/bin/env python +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + import argparse import os.path diff --git a/tools/states_to_dot.py b/tools/states_to_dot.py index c452351c20..0a03c2c0ec 100755 --- a/tools/states_to_dot.py +++ b/tools/states_to_dot.py @@ -26,6 +26,7 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) sys.path.insert(0, top_dir) + def print_header(text): print("*" * len(text)) print(text) diff --git a/tox.ini b/tox.ini index 746e86ba0e..4ba32ddd12 100644 --- a/tox.ini +++ b/tox.ini @@ -67,7 +67,7 @@ commands = {posargs} [flake8] ignore = E129 -exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,tools +exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build max-complexity=17 [hacking]