summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLucas Alvares Gomes <lucasagomes@gmail.com>2015-12-17 18:15:15 +0000
committerHaomeng,Wang <whaom@cn.ibm.com>2015-12-24 01:56:39 +0000
commitb51f7d4d8c4d6760521d5bc2349911c40823de64 (patch)
treeab63773cda6365d54bb2bb0e2db102155bd80698
parent930dee6242a11a2d85d378414763250f7bfa375c (diff)
downloadironic-b51f7d4d8c4d6760521d5bc2349911c40823de64.tar.gz
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
-rwxr-xr-xdevstack/tools/ironic/scripts/configure-vm.py13
-rwxr-xr-xtools/states_to_dot.py1
-rw-r--r--tox.ini2
3 files changed, 15 insertions, 1 deletions
diff --git a/devstack/tools/ironic/scripts/configure-vm.py b/devstack/tools/ironic/scripts/configure-vm.py
index 378fcb85a..2d5a9adf1 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 c452351c2..0a03c2c0e 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 746e86ba0..4ba32ddd1 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]