Fix errors found by new pycodestyle

pycodestyle 2.6.0 has some new errors, fix them.

Also bumped minimum hacking to 3.0.1 so it pulls in
the correct flake8, etc, libraries.

Added basepython directive in tox.ini since local
'tox -e pep8' runs were using python2 otherwise.

Change-Id: I3a9f7c2df5b68a3bad036121c9b10b1c184d261c
This commit is contained in:
Brian Haley 2020-05-12 17:24:48 -04:00
parent a585ca069b
commit 37f0d12ba6
3 changed files with 4 additions and 3 deletions

View File

@ -128,8 +128,8 @@ def diff_list_of_dict(old_list, new_list):
:returns: A tuple where the first item is a list of the added dicts in
the diff and the second item is the removed dicts.
"""
new_set = set([dict2str(l) for l in new_list])
old_set = set([dict2str(l) for l in old_list])
new_set = set([dict2str(i) for i in new_list])
old_set = set([dict2str(i) for i in old_list])
added = new_set - old_set
removed = old_set - new_set
return [str2dict(a) for a in added], [str2dict(r) for r in removed]

View File

@ -2,7 +2,7 @@
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
hacking>=3.0.0,<3.1 # Apache-2.0
hacking>=3.0.1,<3.1.0 # Apache-2.0
bandit!=1.6.0,>=1.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0

View File

@ -5,6 +5,7 @@ skipsdist = True
ignore_basepython_conflict = True
[testenv]
basepython = python3
usedevelop = True
passenv = TRACE_FAILONLY
setenv =