From 4c15915051db817117f6bf9d1eef50e225cedeb4 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 25 Jan 2024 11:57:00 +0900 Subject: [PATCH] Bump hacking hacking 3.1.x is too old. Change-Id: I40369a5eef87cb6a356e059e005eb417ec67bb84 --- .pre-commit-config.yaml | 2 +- oslo_versionedobjects/tests/test_fields.py | 9 ++++++--- requirements.txt | 3 --- test-requirements.txt | 5 +---- 4 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 08aef91b..9b908c6d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -32,7 +32,7 @@ repos: - id: flake8 name: flake8 additional_dependencies: - - hacking>=3.0.1,<3.1.0 + - hacking>=6.1.0,<6.2.0 language: python entry: flake8 files: '^.*\.py$' diff --git a/oslo_versionedobjects/tests/test_fields.py b/oslo_versionedobjects/tests/test_fields.py index 0c92c676..65c8b546 100644 --- a/oslo_versionedobjects/tests/test_fields.py +++ b/oslo_versionedobjects/tests/test_fields.py @@ -223,7 +223,8 @@ class TestMACAddress(TestField): pattern = schema['pattern'] for _, valid_val in self.coerce_good_values: self.assertRegex(valid_val, pattern) - invalid_vals = [x for x in self.coerce_bad_values if type(x) == 'str'] + invalid_vals = [x for x in self.coerce_bad_values + if isinstance(x, str)] for invalid_val in invalid_vals: self.assertNotRegex(invalid_val, pattern) @@ -255,7 +256,8 @@ class TestPCIAddress(TestField): pattern = schema['pattern'] for _, valid_val in self.coerce_good_values: self.assertRegex(valid_val, pattern) - invalid_vals = [x for x in self.coerce_bad_values if type(x) == 'str'] + invalid_vals = [x for x in self.coerce_bad_values + if isinstance(x, str)] for invalid_val in invalid_vals: self.assertNotRegex(invalid_val, pattern) @@ -312,7 +314,8 @@ class TestUUID(TestField): pattern = schema['pattern'] for _, valid_val in self.coerce_good_values[:4]: self.assertRegex(valid_val, pattern) - invalid_vals = [x for x in self.coerce_bad_values if type(x) == 'str'] + invalid_vals = [x for x in self.coerce_bad_values + if isinstance(x, str)] for invalid_val in invalid_vals: self.assertNotRegex(invalid_val, pattern) diff --git a/requirements.txt b/requirements.txt index 1235e455..c90e95b1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,3 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. oslo.concurrency>=3.26.0 # Apache-2.0 oslo.config>=5.2.0 # Apache-2.0 oslo.context>=2.19.2 # Apache-2.0 diff --git a/test-requirements.txt b/test-requirements.txt index 4e2c2a2d..769673bf 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,7 +1,4 @@ -# The order of packages is significant, because pip processes them in the order -# of appearance. Changing the order has an impact on the overall integration -# process, which may cause wedges in the gate later. -hacking>=3.1.0,<3.2.0 # Apache-2.0 +hacking>=6.1.0,<6.2.0 # Apache-2.0 oslotest>=3.2.0 # Apache-2.0 testtools>=2.2.0 # MIT coverage!=4.4,>=4.0 # Apache-2.0