From 18642316939dd202bc4bc85dd6e47e4ac354cf75 Mon Sep 17 00:00:00 2001 From: Michal Nasiadka Date: Mon, 7 Oct 2024 12:27:46 +0200 Subject: CI: bump hacking Change-Id: I5f2177b7c2edc0e35ed2e8e9bdfc4be2f262309f --- kolla/common/sources.py | 4 ++-- kolla/hacking/checks.py | 2 +- kolla/image/kolla_worker.py | 4 ++-- kolla/template/methods.py | 3 ++- test-requirements.txt | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/kolla/common/sources.py b/kolla/common/sources.py index aebc25e72..ac73f422d 100644 --- a/kolla/common/sources.py +++ b/kolla/common/sources.py @@ -56,8 +56,8 @@ SOURCES = { 'location': ('$tarballs_base/openstack/designate/' 'designate-${openstack_branch}.tar.gz')}, 'etcd': { - # NOTE(wszumski): It is suggested to upgrade one minor version at a time: - # https://github.com/etcd-io/website/blob/cf046546dec9e1dcea966dc21ea38027c3290e9a/content/en/docs/v3.4/upgrades/upgrade_3_4.md#upgrade-requirements + # NOTE(wszumski): Upgrade one minor version at a time: + # https://etcd.io/docs/v3.4/upgrades/upgrade_3_4/ 'version': '3.5.16', 'type': 'url', 'sha256': { diff --git a/kolla/hacking/checks.py b/kolla/hacking/checks.py index 64e322786..34571e4d6 100644 --- a/kolla/hacking/checks.py +++ b/kolla/hacking/checks.py @@ -49,7 +49,7 @@ def check_explicit_underscore_import(logical_line, filename): UNDERSCORE_IMPORT_FILES.append(filename) elif (translated_log.match(logical_line) or string_translation.match(logical_line)): - yield(0, "D703: Found use of _() without explicit import of _!") + yield (0, "D703: Found use of _() without explicit import of _!") @core.flake8ext diff --git a/kolla/image/kolla_worker.py b/kolla/image/kolla_worker.py index a464d2113..1e3f4d861 100644 --- a/kolla/image/kolla_worker.py +++ b/kolla/image/kolla_worker.py @@ -566,8 +566,8 @@ class KollaWorker(object): with open(self.conf.summary_json_file, "w") as f: json_summary(f, indent=4) except OSError as e: - LOG.error(f'Failed to write JSON build summary to ' - '{self.conf.summary_json_file}') + LOG.error('Failed to write JSON build summary to ' + f'{self.conf.summary_json_file}') LOG.error(f'Exception caught: {e}') sys.exit(1) diff --git a/kolla/template/methods.py b/kolla/template/methods.py index 1a5926702..6747504fa 100644 --- a/kolla/template/methods.py +++ b/kolla/template/methods.py @@ -128,7 +128,8 @@ def handle_repos(context, reponames, mode): >>/etc/apt/sources.list.d/{repo}.sources \ && """ if repo_list[repo]['arch']: - commands += f"""echo 'Architectures: {repo_list[repo]['arch']}' \ + commands += f"""echo 'Architectures: \ +{repo_list[repo]['arch']}' \ >>/etc/apt/sources.list.d/{repo}.sources \ && """ except KeyError: diff --git a/test-requirements.txt b/test-requirements.txt index d37daf377..ad35b8796 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -3,7 +3,7 @@ bashate>=0.5.1 # Apache-2.0 coverage!=4.4,>=4.0 # Apache-2.0 ddt>=1.0.1 # MIT docker>=3.0.0 # Apache-2.0 -hacking>=3.0.1,<3.1.0 # Apache-2.0 +hacking>=7.0.0,<=7.1.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 stestr>=2.2.0 # Apache-2.0 testtools>=2.2.0 # MIT -- cgit v1.2.3