mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Bulk autopep8 (modules)
As agreed in 2017-12-07 Core meeting bulk fix pep8 issues Generated using: autopep8 1.3.3 (pycodestyle: 2.3.1) autopep8 -r --max-line-length 160 --in-place --ignore E305,E402,E722,E741 lib/ansible/modules Manually fix issues that autopep8 has introduced
This commit is contained in:
parent
d13d7e9404
commit
c57a7f05e1
314 changed files with 3462 additions and 3383 deletions
|
@ -129,7 +129,7 @@ class NetAppCDOTQTree(object):
|
|||
qtree_list_iter = netapp_utils.zapi.NaElement('qtree-list-iter')
|
||||
query_details = netapp_utils.zapi.NaElement.create_node_with_children(
|
||||
'qtree-info', **{'vserver': self.vserver,
|
||||
'volume':self.flexvol_name,
|
||||
'volume': self.flexvol_name,
|
||||
'qtree': self.name})
|
||||
|
||||
query = netapp_utils.zapi.NaElement('query')
|
||||
|
|
|
@ -246,7 +246,7 @@ class NetAppCDOTVolume(object):
|
|||
else:
|
||||
volume_delete = netapp_utils.zapi.NaElement.create_node_with_children(
|
||||
'volume-destroy', **{'name': self.name, 'unmount-and-offline':
|
||||
'true'})
|
||||
'true'})
|
||||
|
||||
try:
|
||||
self.server.invoke_successfully(volume_delete,
|
||||
|
|
|
@ -168,7 +168,7 @@ def create_async(module, ssid, api_url, api_pwd, api_usr, body):
|
|||
rc, data = request(url, data=post_data, method='POST', url_username=api_usr, url_password=api_pwd,
|
||||
headers=HEADERS)
|
||||
except Exception as e:
|
||||
module.exit_json(msg="Exception while creating aysnc mirror group. Message: %s" % to_native(e),
|
||||
module.exit_json(msg="Exception while creating aysnc mirror group. Message: %s" % to_native(e),
|
||||
exception=traceback.format_exc())
|
||||
return data
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ class GroupBy(object):
|
|||
# python 2, 3 generic grouping.
|
||||
def __init__(self, iterable, key=None):
|
||||
if key is None:
|
||||
key = lambda x: x
|
||||
def key(x): return x
|
||||
self.keyfunc = key
|
||||
self.it = iter(iterable)
|
||||
self.tgtkey = self.currkey = self.currvalue = object()
|
||||
|
|
|
@ -312,11 +312,11 @@ class SolidFireSnapShotSchedule(object):
|
|||
elif self.state == 'present':
|
||||
# Check if we need to update the account
|
||||
|
||||
if self.retention is not None and schedule_detail.schedule_info.retention !=self.retention:
|
||||
if self.retention is not None and schedule_detail.schedule_info.retention != self.retention:
|
||||
update_schedule = True
|
||||
changed = True
|
||||
|
||||
elif schedule_detail.name !=self.name:
|
||||
elif schedule_detail.name != self.name:
|
||||
update_schedule = True
|
||||
changed = True
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ class SolidFireVolumeAccessGroup(object):
|
|||
update_group = True
|
||||
changed = True
|
||||
elif self.virtual_network_id is not None or self.virtual_network_tags is not None or \
|
||||
self.attributes is not None:
|
||||
self.attributes is not None:
|
||||
update_group = True
|
||||
changed = True
|
||||
|
||||
|
|
|
@ -289,7 +289,7 @@ class SolidFireVolume(object):
|
|||
elif volume_detail.total_size is not None and volume_detail.total_size != self.size:
|
||||
size_difference = abs(float(volume_detail.total_size - self.size))
|
||||
# Change size only if difference is bigger than 0.001
|
||||
if size_difference/self.size > 0.001:
|
||||
if size_difference / self.size > 0.001:
|
||||
update_volume = True
|
||||
changed = True
|
||||
|
||||
|
@ -312,8 +312,8 @@ class SolidFireVolume(object):
|
|||
self.create_volume()
|
||||
result_message = "Volume created"
|
||||
elif update_volume:
|
||||
self.update_volume()
|
||||
result_message = "Volume updated"
|
||||
self.update_volume()
|
||||
result_message = "Volume updated"
|
||||
|
||||
elif self.state == 'absent':
|
||||
self.delete_volume()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue