pre-commit: Bump versions

The older version used are not compatible with the default Python on
Fedora 43.

Bumping hacking (and by extension flake8) brings up 3 new issues that we
resolve here.

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Iba6de2d3e2ddb4ae5d73694f01367261371a5e92
This commit is contained in:
Stephen Finucane
2026-02-09 13:43:58 +00:00
parent 5a707a7b8f
commit 574fc1bdee
3 changed files with 6 additions and 8 deletions
+4 -4
View File
@@ -1,13 +1,13 @@
---
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: mixed-line-ending
args: ['--fix', 'lf']
exclude: '.*\.(svg)$'
- id: check-byte-order-marker
- id: fix-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: debug-statements
@@ -15,7 +15,7 @@ repos:
files: .*\.(yaml|yml)$
exclude: '^(zuul.d|rally-jobs)/.*$'
- repo: https://github.com/PyCQA/doc8
rev: v1.1.1
rev: v2.0.0
hooks:
- id: doc8
args: ['--ignore', 'D001']
@@ -25,7 +25,7 @@ repos:
- id: bashate
args: ['--ignore', 'E006,E042,E043']
- repo: https://opendev.org/openstack/hacking
rev: 6.1.0
rev: 8.0.0
hooks:
- id: hacking
additional_dependencies: []
-2
View File
@@ -59,8 +59,6 @@ def fake_execute(*cmd_parts, **kwargs):
It optionally executes a preconfigued function to return expected data.
"""
global _fake_execute_repliers
process_input = kwargs.get('process_input', None)
check_exit_code = kwargs.get('check_exit_code', 0)
delay_on_retry = kwargs.get('delay_on_retry', True)
@@ -105,7 +105,7 @@ class AffinityFilterTestCase(test.TestCase):
self.assertRaises(affinity.SchedulerHintsNotSet,
self.filter._validate, hints)
@ mock.patch('manila.share.api.API.get')
@mock.patch('manila.share.api.API.get')
def test_affinity_filter(self, mock_share_get):
mock_share_get.side_effect = self._fake_get
@@ -118,7 +118,7 @@ class AffinityFilterTestCase(test.TestCase):
self.assertNotIn('host2', valid_hosts)
self.assertNotIn('host3', valid_hosts)
@ mock.patch('manila.share.api.API.get')
@mock.patch('manila.share.api.API.get')
def test_anti_affinity_filter(self, mock_share_get):
mock_share_get.side_effect = self._fake_get