mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Bulk pep8 fixes - hand crafted (#33690)
* Bulk pep8 fixes - hand crafted Fix by hand the remaining issues that autopep8 couldn't * Next batch of hand crafted pep8 fixes * Ignore W503 https://github.com/PyCQA/pycodestyle/pull/499 * Revert more of W503
This commit is contained in:
committed by
Toshio Kuratomi
parent
bcd189509e
commit
18529a275b
@@ -494,7 +494,7 @@ class DME2(object):
|
||||
return self.query(self.record_url, 'GET')['data']
|
||||
|
||||
def _instMap(self, type):
|
||||
#@TODO cache this call so it's executed only once per ansible execution
|
||||
# @TODO cache this call so it's executed only once per ansible execution
|
||||
map = {}
|
||||
results = {}
|
||||
|
||||
@@ -512,15 +512,15 @@ class DME2(object):
|
||||
return json.dumps(data, separators=(',', ':'))
|
||||
|
||||
def createRecord(self, data):
|
||||
#@TODO update the cache w/ resultant record + id when impleneted
|
||||
# @TODO update the cache w/ resultant record + id when impleneted
|
||||
return self.query(self.record_url, 'POST', data)
|
||||
|
||||
def updateRecord(self, record_id, data):
|
||||
#@TODO update the cache w/ resultant record + id when impleneted
|
||||
# @TODO update the cache w/ resultant record + id when impleneted
|
||||
return self.query(self.record_url + '/' + str(record_id), 'PUT', data)
|
||||
|
||||
def deleteRecord(self, record_id):
|
||||
#@TODO remove record from the cache when impleneted
|
||||
# @TODO remove record from the cache when impleneted
|
||||
return self.query(self.record_url + '/' + str(record_id), 'DELETE')
|
||||
|
||||
def getMonitor(self, record_id):
|
||||
@@ -676,7 +676,7 @@ def main():
|
||||
# Follow Keyword Controlled Behavior
|
||||
if state == 'present':
|
||||
# return the record if no value is specified
|
||||
if not "value" in new_record:
|
||||
if "value" not in new_record:
|
||||
if not current_record:
|
||||
module.fail_json(
|
||||
msg="A record with name '%s' does not exist for domain '%s.'" % (record_name, module.params['domain']))
|
||||
|
||||
@@ -356,7 +356,7 @@ def main():
|
||||
'address': ipv4_networks[ipv4_network]['address'],
|
||||
'netmask': ipv4_networks[ipv4_network]['netmask']
|
||||
}
|
||||
if not current_interface in interface_to_ipv4:
|
||||
if current_interface not in interface_to_ipv4:
|
||||
interface_to_ipv4[current_interface] = []
|
||||
interface_to_ipv4[current_interface].append(current_network)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user