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
This commit is contained in:
parent
930dee6242
commit
b51f7d4d8c
@ -1,4 +1,17 @@
|
|||||||
#!/usr/bin/env python
|
#!/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 argparse
|
||||||
import os.path
|
import os.path
|
||||||
|
@ -26,6 +26,7 @@ top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__),
|
|||||||
os.pardir))
|
os.pardir))
|
||||||
sys.path.insert(0, top_dir)
|
sys.path.insert(0, top_dir)
|
||||||
|
|
||||||
|
|
||||||
def print_header(text):
|
def print_header(text):
|
||||||
print("*" * len(text))
|
print("*" * len(text))
|
||||||
print(text)
|
print(text)
|
||||||
|
2
tox.ini
2
tox.ini
@ -67,7 +67,7 @@ commands = {posargs}
|
|||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = E129
|
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
|
max-complexity=17
|
||||||
|
|
||||||
[hacking]
|
[hacking]
|
||||||
|
Loading…
Reference in New Issue
Block a user