Update hacking

This allows us to run tox -epep8 on newer python versions. Fix the
issues newer hacking calls out. They were complaints about indentation
and ambigious l value variable names.

Change-Id: I9552fba791bdf54649fbe25fc26bffdf8186ff0a
This commit is contained in:
Clark Boylan 2020-08-05 13:25:59 -07:00
parent 73c11c6267
commit 206b795517
4 changed files with 5 additions and 5 deletions

View File

@ -78,7 +78,7 @@ class TestCommands(base.BaseTestCase):
stdout, stderr, return_code = self.run_pbr('freeze') stdout, stderr, return_code = self.run_pbr('freeze')
self.assertEqual(0, return_code) self.assertEqual(0, return_code)
pkgs = [] pkgs = []
for l in stdout.split('\n'): for line in stdout.split('\n'):
pkgs.append(l.split('==')[0].lower()) pkgs.append(line.split('==')[0].lower())
pkgs_sort = sorted(pkgs[:]) pkgs_sort = sorted(pkgs[:])
self.assertEqual(pkgs_sort, pkgs) self.assertEqual(pkgs_sort, pkgs)

View File

@ -548,7 +548,7 @@ def get_extension_modules(config):
else: else:
# Backwards compatibility for old syntax; don't use this though # Backwards compatibility for old syntax; don't use this though
labels = section.split('=', 1) labels = section.split('=', 1)
labels = [l.strip() for l in labels] labels = [label.strip() for label in labels]
if (len(labels) == 2) and (labels[0] == 'extension'): if (len(labels) == 2) and (labels[0] == 'extension'):
ext_args = {} ext_args = {}
for field in EXTENSION_FIELDS: for field in EXTENSION_FIELDS:

View File

@ -4,7 +4,7 @@
wheel>=0.32.0 # MIT wheel>=0.32.0 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD fixtures>=3.0.0 # Apache-2.0/BSD
hacking>=1.1.0,<1.2.0 # Apache-2.0 hacking>=1.1.0,<4.0.0 # Apache-2.0
mock>=2.0.0 # BSD mock>=2.0.0 # BSD
six>=1.12.0 # MIT six>=1.12.0 # MIT
stestr>=2.1.0,<3.0;python_version=='2.7' # Apache-2.0 stestr>=2.1.0,<3.0;python_version=='2.7' # Apache-2.0