Fix flake8 gating in tox.

- based on https://review.openstack.org/#/c/26327/.
- fix the remaining violations.
This commit is contained in:
Chmouel Boudjnah 2013-04-21 06:34:22 +02:00
parent 643d1d1e6e
commit c3c09ad38f
4 changed files with 9 additions and 4 deletions

View File

@ -206,7 +206,7 @@ def create_objects(cnx, acc, o_amount, fmax, index_containers):
"(filename: %s,\tsize: %.3f KB)" %
(container,
object_name.encode('ascii', 'ignore'),
float(len(data))/1024))
float(len(data)) / 1024))
obj_info = {'object_info':
(object_name, etag, len(data)), 'meta': meta}
containers_d[container]['objects'].append(obj_info)

View File

@ -60,7 +60,7 @@ def get_object(storage_url, token,
if not swift.common.http.is_success(resp.status):
resp.read()
#TODO: logging
# TODO(chmou): logging
raise swiftclient.ClientException(
'status %s %s' % (resp.status, resp.reason))

View File

@ -20,8 +20,8 @@
# Last-Modified middleware must be installed in the proxy-server
# pipeline.
import unittest
import swiftclient
import unittest
CONF = {
'user': ('demo:demo', 'wxcvbn'),

View File

@ -15,7 +15,7 @@ deps = -r{toxinidir}/tools/pip-requires
commands = python setup.py testr --testr-args="{posargs}"
[testenv:flake8]
deps = flake8
sitepackages = False
commands = flake8 --show-source swsync bin setup.py tests
[testenv:venv]
@ -26,3 +26,8 @@ commands = python setup.py testr --coverage
[tox:jenkins]
downloadcache = ~/cache/pip
[flake8]
ignore = E12,E711,E721,E712,H302,H303,H403,H404,F
builtins = _
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,plugins,tools