Update hacking ignore list and pep8 clean

This commit updates the ignore list to be more consistent with the set
of rules used in tempest. Additionally it fixes all the pep8 issues
which were failing.
This commit is contained in:
Matthew Treinish 2014-08-28 10:33:16 -04:00
parent 622d56b7a5
commit 8204858d38
7 changed files with 18 additions and 12 deletions

View File

@ -1,6 +1,9 @@
[DEFAULT]
# The list of modules to copy from oslo-incubator.git
module=log
module=versionutils
# The base module to hold the copy of openstack.common
base=tempest_lib
base=tempest_lib

View File

@ -1,2 +1,3 @@
pbr>=0.6,!=0.7,<1.0
Babel>=1.3
Babel>=1.3
fixtures

View File

@ -19,4 +19,4 @@ import setuptools
setuptools.setup(
setup_requires=['pbr'],
pbr=True)
pbr=True)

View File

@ -16,4 +16,4 @@ import pbr.version
__version__ = pbr.version.VersionInfo(
'tempest_lib').version_string()
'tempest_lib').version_string()

View File

@ -36,8 +36,8 @@ def details_multiple(output_lines, with_label=False):
items = []
tables_ = tables(output_lines)
for table_ in tables_:
if 'Property' not in table_['headers'] \
or 'Value' not in table_['headers']:
if ('Property' not in table_['headers']
or 'Value' not in table_['headers']):
raise exceptions.InvalidStructure()
item = {}
for value in table_['values']:
@ -55,8 +55,7 @@ def details(output_lines, with_label=False):
def listing(output_lines):
"""Return list of dicts with basic item info parsed from cli output.
"""
"""Return list of dicts with basic item info parsed from cli output."""
items = []
table_ = table(output_lines)

View File

@ -17,13 +17,13 @@ import testtools
class TempestException(Exception):
"""
Base Tempest Exception
"""Base Tempest Exception.
To correctly use this class, inherit from it and define
a 'message' property. That message will get printf'd
with the keyword arguments provided to the constructor.
"""
message = "An unknown exception occurred"
def __init__(self, *args, **kwargs):

View File

@ -27,8 +27,11 @@ commands = python setup.py build_sphinx
[flake8]
# H803 skipped on purpose per list discussion.
# E123, E125 skipped as they are invalid PEP-8.
# H402 skipped because some docstrings aren't sentences
# E123 skipped because it is ignored by default in the default pep8
# E129 skipped because it is too limiting when combined with other rules
# H305 skipped because it is inconsistent between python versions
show-source = True
ignore = E123,E125,H803
ignore = E123,E125,H803,H402,E123,E129,H305
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build