1. Wrong use of 'noqa'. "# flake8: noqa" option disables all checks
for the whole file.
2. Remove exclusion of 'tools' and '*openstack/common*' in flake8 and
fix the violations.
Change-Id: I153e992ffd6a80e70a99d7066c503c34326c93ab
Closes-bug: #1540254
Making this change for python-cinderclient to be consistent
with Cinder. The same change was made to Cinder via
commit ff3f2e5735f0d486b72b6881b05ace94d6d34d03 .
Partial-bug 1229324
Change-Id: I69fb960f499f0c9a9c9671d46d10170477cf6695
Python3 changed the behavior of dict.keys such that it is now
returns a dict_keys object, which is iterable but not indexable.
You can get the python2 result back with an explicit call to list.
Refactor list(*.keys()) so that it just uses list().
Change-Id: Ib2e9646ac967e9bd7cc4f47e2099f5d1358808a9
Signed-off-by: Chuck Short <chuck.short@canonical.com>
The testsuite is full of the following:
TypeError: 'dict_keys' object does not support indexing
This is due to the fact in python3 dict methods dict.keys(),
dict.items() and dict.values() return “views” instead of lists.
Change-Id: Ifa5383e6485fdbabf363fd1442877b2452346c1c
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Use six to allow python2/pyton3 for iteritems and
iterkeys.
six.iteriems() replaces dictionary.iteritems() (python2)
and dictionary.iterms() (python3)
six.iterkeys() replaces dictionary.iterkeys (python2)
and dictionary.keys() (python3)
Change-Id: I26c80b78a7dedf3aa32eedf01a83ff6d1e592ba7
Signed-off-by: Chuck Short <chuck.short@canonical.com>
This patch adds output of tests and their results to run_tests.sh.
It also brings back colorizer to the output and updates the test-requirements.
Should align with cinder changes that are in progress
at: https://review.openstack.org/#/c/30291/
Change-Id: I3df6d861f4b4d4355464ceb2d507e69bcf682fbe