diff --git a/pbr/tests/test_commands.py b/pbr/tests/test_commands.py index 51e27116..7cf3fa91 100644 --- a/pbr/tests/test_commands.py +++ b/pbr/tests/test_commands.py @@ -78,7 +78,7 @@ class TestCommands(base.BaseTestCase): stdout, stderr, return_code = self.run_pbr('freeze') self.assertEqual(0, return_code) pkgs = [] - for l in stdout.split('\n'): - pkgs.append(l.split('==')[0].lower()) + for line in stdout.split('\n'): + pkgs.append(line.split('==')[0].lower()) pkgs_sort = sorted(pkgs[:]) self.assertEqual(pkgs_sort, pkgs) diff --git a/pbr/tests/test_util.py b/pbr/tests/test_util.py index 1cbb2d2a..a9fdf6e4 100644 --- a/pbr/tests/test_util.py +++ b/pbr/tests/test_util.py @@ -146,7 +146,7 @@ class TestKeywordsParsingScenarios(base.BaseTestCase): three """, # noqa: E501 'expected_keywords': ['one', 'two', 'three'], - }, + }, ), ('inline_keywords', { 'config_text': """ diff --git a/pbr/util.py b/pbr/util.py index 1e9fdc49..60b7cd7e 100644 --- a/pbr/util.py +++ b/pbr/util.py @@ -548,7 +548,7 @@ def get_extension_modules(config): else: # Backwards compatibility for old syntax; don't use this though 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'): ext_args = {} for field in EXTENSION_FIELDS: diff --git a/test-requirements.txt b/test-requirements.txt index 0358a796..a3c5a110 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,7 +4,7 @@ wheel>=0.32.0 # MIT 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 six>=1.12.0 # MIT stestr>=2.1.0,<3.0;python_version=='2.7' # Apache-2.0