Bump hacking to 7.0.0 and fix linting issues

Change-Id: I367608e33ddf6084ebf8c1093f9ff34ac52dc6d2
This commit is contained in:
Pierre Riteau 2024-08-28 15:08:45 +02:00
parent 1332265ded
commit e1f6650eee
5 changed files with 6 additions and 10 deletions

View File

@ -30,5 +30,5 @@ class AllocationClientManager(base.BaseClientManager):
resp, body = self.request_manager.get('/%s/allocations' % resource)
allocations = body['allocations']
if sort_by:
allocations = sorted(allocations, key=lambda l: l[sort_by])
allocations = sorted(allocations, key=lambda alloc: alloc[sort_by])
return allocations

View File

@ -43,5 +43,5 @@ class FloatingIPClientManager(base.BaseClientManager):
resp, body = self.request_manager.get('/floatingips')
floatingips = body['floatingips']
if sort_by:
floatingips = sorted(floatingips, key=lambda l: l[sort_by])
floatingips = sorted(floatingips, key=lambda fip: fip[sort_by])
return floatingips

View File

@ -51,7 +51,7 @@ class ComputeHostClientManager(base.BaseClientManager):
resp, body = self.request_manager.get('/os-hosts')
hosts = body['hosts']
if sort_by:
hosts = sorted(hosts, key=lambda l: l[sort_by])
hosts = sorted(hosts, key=lambda host: host[sort_by])
return hosts
def list_properties(self, detail=False, all=False, sort_by=None):
@ -76,7 +76,7 @@ class ComputeHostClientManager(base.BaseClientManager):
if sort_by:
resource_properties = sorted(resource_properties,
key=lambda l: l[sort_by])
key=lambda rp: rp[sort_by])
return resource_properties
def get_property(self, property_name):

View File

@ -91,7 +91,7 @@ class LeaseClientManager(base.BaseClientManager):
resp, body = self.request_manager.get('/leases')
leases = body['leases']
if sort_by:
leases = sorted(leases, key=lambda l: l[sort_by])
leases = sorted(leases, key=lambda lease: lease[sort_by])
return leases
def _add_lease_date(self, values, lease, key, delta_date, positive_delta):

View File

@ -1,11 +1,7 @@
# 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>=1.1.0,<3.0.1 # Apache-2.0
# remove this pyflakes from here once you bump the
# hacking to 3.2.0 or above. hacking 3.2.0 takes
# care of pyflakes version compatibilty.
pyflakes>=2.1.1
hacking>=7.0.0,<7.1.0 # Apache-2.0
oslotest>=3.2.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD