diff options
author | Clark Boylan <clark.boylan@gmail.com> | 2020-08-05 13:25:59 -0700 |
---|---|---|
committer | Clark Boylan <clark.boylan@gmail.com> | 2020-08-05 15:01:21 -0700 |
commit | 206b795517a13d759f60ed9605eb03ca785ce10a (patch) | |
tree | 5e70123dfadddcd4cf08436b051c83b124d2e3c7 | |
parent | 73c11c626726ddadc0f43a57e5b7007236da38c5 (diff) | |
download | pbr-206b795517a13d759f60ed9605eb03ca785ce10a.tar.gz |
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
-rw-r--r-- | pbr/tests/test_commands.py | 4 | ||||
-rw-r--r-- | pbr/tests/test_util.py | 2 | ||||
-rw-r--r-- | pbr/util.py | 2 | ||||
-rw-r--r-- | test-requirements.txt | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/pbr/tests/test_commands.py b/pbr/tests/test_commands.py index 51e2711..7cf3fa9 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 1cbb2d2..a9fdf6e 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 1e9fdc4..60b7cd7 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 0358a79..a3c5a11 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 |