pre-commit: Bump versions
Apply manual changes required by ruff. Automatic changes were done separately. Change-Id: I7db65bd2ac3f31b0479699946398752d8d729338 Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
ab2e68f407
commit
9c7a5d4e51
@ -1,7 +1,7 @@
|
||||
---
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.6.0
|
||||
rev: v5.0.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
- id: mixed-line-ending
|
||||
@ -15,7 +15,7 @@ repos:
|
||||
files: .*\.(yaml|yml)$
|
||||
args: ['--unsafe']
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.6.2
|
||||
rev: v0.11.2
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: ['--fix', '--unsafe-fixes']
|
||||
|
@ -94,7 +94,7 @@ def run(opts):
|
||||
c_list = obj_api.container_list()
|
||||
print("Name\tCount\tBytes")
|
||||
for c in c_list:
|
||||
print("%s\t%d\t%d" % (c['name'], c['count'], c['bytes']))
|
||||
print(f"{c['name']}\t{c['count']}\t{c['bytes']}")
|
||||
|
||||
if len(c_list) > 0:
|
||||
# See what is in the first container
|
||||
|
@ -87,7 +87,7 @@ def run(opts):
|
||||
c_list = client_manager.object_store.container_list()
|
||||
print("Name\tCount\tBytes")
|
||||
for c in c_list:
|
||||
print("%s\t%d\t%d" % (c['name'], c['count'], c['bytes']))
|
||||
print(f"{c['name']}\t{c['count']}\t{c['bytes']}")
|
||||
|
||||
if len(c_list) > 0:
|
||||
# See what is in the first container
|
||||
|
@ -23,7 +23,7 @@ def transform_compute_security_group_rule(sg_rule):
|
||||
from_port = info.pop('from_port')
|
||||
to_port = info.pop('to_port')
|
||||
if isinstance(from_port, int) and isinstance(to_port, int):
|
||||
port_range = {'port_range': "%u:%u" % (from_port, to_port)}
|
||||
port_range = {'port_range': f"{from_port}:{to_port}"}
|
||||
elif from_port is None and to_port is None:
|
||||
port_range = {'port_range': ""}
|
||||
else:
|
||||
|
@ -1270,8 +1270,7 @@ class AddGatewayToRouter(command.ShowOne):
|
||||
parser.add_argument(
|
||||
metavar="<network>",
|
||||
help=_(
|
||||
"External Network to a attach a router gateway to (name or "
|
||||
"ID)"
|
||||
"External Network to a attach a router gateway to (name or ID)"
|
||||
),
|
||||
dest='external_gateways',
|
||||
# The argument is stored in a list in order to reuse the
|
||||
@ -1338,8 +1337,7 @@ class RemoveGatewayFromRouter(command.ShowOne):
|
||||
parser.add_argument(
|
||||
metavar="<network>",
|
||||
help=_(
|
||||
"External Network to remove a router gateway from (name or "
|
||||
"ID)"
|
||||
"External Network to remove a router gateway from (name or ID)"
|
||||
),
|
||||
dest='external_gateways',
|
||||
# The argument is stored in a list in order to reuse the
|
||||
|
@ -54,13 +54,9 @@ class IdentityProviderTests(common.IdentityTests):
|
||||
identity_provider = self._create_dummy_idp(add_clean_up=True)
|
||||
new_remoteid = data_utils.rand_name('newRemoteId')
|
||||
raw_output = self.openstack(
|
||||
'identity provider set '
|
||||
'%(identity-provider)s '
|
||||
'--remote-id %(remote-id)s '
|
||||
% {
|
||||
'identity-provider': identity_provider,
|
||||
'remote-id': new_remoteid,
|
||||
}
|
||||
f'identity provider set '
|
||||
f'{identity_provider} '
|
||||
f'--remote-id {new_remoteid}'
|
||||
)
|
||||
self.assertEqual(0, len(raw_output))
|
||||
raw_output = self.openstack(
|
||||
|
@ -52,13 +52,9 @@ class ServiceProviderTests(common.IdentityTests):
|
||||
service_provider = self._create_dummy_sp(add_clean_up=True)
|
||||
new_description = data_utils.rand_name('newDescription')
|
||||
raw_output = self.openstack(
|
||||
'service provider set '
|
||||
'%(service-provider)s '
|
||||
'--description %(description)s '
|
||||
% {
|
||||
'service-provider': service_provider,
|
||||
'description': new_description,
|
||||
}
|
||||
f'service provider set '
|
||||
f'{service_provider} '
|
||||
f'--description {new_description}'
|
||||
)
|
||||
updated_value = self.parse_show_as_object(raw_output)
|
||||
self.assertEqual(new_description, updated_value.get('description'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user