Fix flake8 gating in tox.
- based on https://review.openstack.org/#/c/26327/. - fix the remaining violations.
This commit is contained in:
parent
643d1d1e6e
commit
c3c09ad38f
@ -206,7 +206,7 @@ def create_objects(cnx, acc, o_amount, fmax, index_containers):
|
|||||||
"(filename: %s,\tsize: %.3f KB)" %
|
"(filename: %s,\tsize: %.3f KB)" %
|
||||||
(container,
|
(container,
|
||||||
object_name.encode('ascii', 'ignore'),
|
object_name.encode('ascii', 'ignore'),
|
||||||
float(len(data))/1024))
|
float(len(data)) / 1024))
|
||||||
obj_info = {'object_info':
|
obj_info = {'object_info':
|
||||||
(object_name, etag, len(data)), 'meta': meta}
|
(object_name, etag, len(data)), 'meta': meta}
|
||||||
containers_d[container]['objects'].append(obj_info)
|
containers_d[container]['objects'].append(obj_info)
|
||||||
|
@ -60,7 +60,7 @@ def get_object(storage_url, token,
|
|||||||
|
|
||||||
if not swift.common.http.is_success(resp.status):
|
if not swift.common.http.is_success(resp.status):
|
||||||
resp.read()
|
resp.read()
|
||||||
#TODO: logging
|
# TODO(chmou): logging
|
||||||
raise swiftclient.ClientException(
|
raise swiftclient.ClientException(
|
||||||
'status %s %s' % (resp.status, resp.reason))
|
'status %s %s' % (resp.status, resp.reason))
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
# Last-Modified middleware must be installed in the proxy-server
|
# Last-Modified middleware must be installed in the proxy-server
|
||||||
# pipeline.
|
# pipeline.
|
||||||
|
|
||||||
import unittest
|
|
||||||
import swiftclient
|
import swiftclient
|
||||||
|
import unittest
|
||||||
|
|
||||||
CONF = {
|
CONF = {
|
||||||
'user': ('demo:demo', 'wxcvbn'),
|
'user': ('demo:demo', 'wxcvbn'),
|
||||||
|
7
tox.ini
7
tox.ini
@ -15,7 +15,7 @@ deps = -r{toxinidir}/tools/pip-requires
|
|||||||
commands = python setup.py testr --testr-args="{posargs}"
|
commands = python setup.py testr --testr-args="{posargs}"
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
deps = flake8
|
sitepackages = False
|
||||||
commands = flake8 --show-source swsync bin setup.py tests
|
commands = flake8 --show-source swsync bin setup.py tests
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
@ -26,3 +26,8 @@ commands = python setup.py testr --coverage
|
|||||||
|
|
||||||
[tox:jenkins]
|
[tox:jenkins]
|
||||||
downloadcache = ~/cache/pip
|
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user