Fix some pylint indentation warnings

Running with a stricter .pylintrc generates a lot of
C0330 warnings (hanging/continued indentation). Fix
the ones in neutron/api.

Trivialfix

Change-Id: I1258b04f64a18036407e1d9de9ddca7472af0d11
This commit is contained in:
Brian Haley 2022-11-02 10:11:46 -04:00
parent ba795c6692
commit 291eabb0b6
5 changed files with 20 additions and 18 deletions

View File

@ -335,8 +335,8 @@ class L3RpcCallback(object):
updated_subnets = []
for subnet_id, prefix in subnets.items():
updated_subnets.append(self.plugin.update_subnet(
context,
updated_subnets.append(
self.plugin.update_subnet(context,
subnet_id,
{'subnet': {'cidr': prefix}}))
return updated_subnets

View File

@ -236,7 +236,8 @@ class ResourcesPushRpcApi(object):
resources_by_type = self._classify_resources_by_type(resource_list)
LOG.debug(
"Pushing event %s for resources: %s", event_type,
{t: ["ID=%s,revision_number=%s" % (
{t:
["ID=%s,revision_number=%s" % (
getattr(obj, 'id', None),
getattr(obj, 'revision_number', None))
for obj in resources_by_type[t]]

View File

@ -550,7 +550,8 @@ class Controller(object):
# should be removed because of authZ policies
fields_to_strip = self._exclude_attributes_by_policy(
request.context, objs[0])
return notify({self._collection: [self._filter_attributes(
return notify({self._collection:
[self._filter_attributes(
obj, fields_to_strip=fields_to_strip)
for obj in objs]})
else: