mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-25 00:44:42 +00:00
pylint: Unnecessary parens after '=' keyword
This patch removes unnecessary usage of parens on attributions.
This commit is contained in:
@@ -476,7 +476,7 @@ def main():
|
|||||||
params = {}
|
params = {}
|
||||||
for x in field_map:
|
for x in field_map:
|
||||||
val = ansible_module.params_get(
|
val = ansible_module.params_get(
|
||||||
x, allow_empty_string=(x in allow_empty_string))
|
x, allow_empty_string=x in allow_empty_string)
|
||||||
|
|
||||||
if val is not None:
|
if val is not None:
|
||||||
params[field_map.get(x, x)] = val
|
params[field_map.get(x, x)] = val
|
||||||
@@ -619,7 +619,7 @@ def main():
|
|||||||
# boolean values, so we need to convert it to str
|
# boolean values, so we need to convert it to str
|
||||||
# for comparison.
|
# for comparison.
|
||||||
# See: https://github.com/freeipa/freeipa/pull/6294
|
# See: https://github.com/freeipa/freeipa/pull/6294
|
||||||
exit_args[k] = (str(value[0]).upper() == "TRUE")
|
exit_args[k] = str(value[0]).upper() == "TRUE"
|
||||||
else:
|
else:
|
||||||
if arg_type not in type_map:
|
if arg_type not in type_map:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ def main():
|
|||||||
invalid = [
|
invalid = [
|
||||||
"forwarders", "forwardpolicy", "skip_overlap_check", "permission"
|
"forwarders", "forwardpolicy", "skip_overlap_check", "permission"
|
||||||
]
|
]
|
||||||
wants_enable = (state == "enabled")
|
wants_enable = state == "enabled"
|
||||||
|
|
||||||
if operation == "del":
|
if operation == "del":
|
||||||
invalid = [
|
invalid = [
|
||||||
|
|||||||
@@ -1453,7 +1453,7 @@ def define_commands_for_present_state(module, zone_name, entry, res_find):
|
|||||||
else:
|
else:
|
||||||
# Create reverse records for existing records
|
# Create reverse records for existing records
|
||||||
for ipv in ['a', 'aaaa']:
|
for ipv in ['a', 'aaaa']:
|
||||||
record = ('%srecord' % ipv)
|
record = '%srecord' % ipv
|
||||||
if record in args and ('%s_extra_create_reverse' % ipv) in args:
|
if record in args and ('%s_extra_create_reverse' % ipv) in args:
|
||||||
cmds = create_reverse_ip_record(
|
cmds = create_reverse_ip_record(
|
||||||
module, zone_name, name, args[record])
|
module, zone_name, name, args[record])
|
||||||
|
|||||||
@@ -414,15 +414,15 @@ def gen_args(pac_type, auth_ind, skip_host_check, force, requires_pre_auth,
|
|||||||
if auth_ind is not None:
|
if auth_ind is not None:
|
||||||
_args['krbprincipalauthind'] = auth_ind
|
_args['krbprincipalauthind'] = auth_ind
|
||||||
if skip_host_check is not None:
|
if skip_host_check is not None:
|
||||||
_args['skip_host_check'] = (skip_host_check)
|
_args['skip_host_check'] = skip_host_check
|
||||||
if force is not None:
|
if force is not None:
|
||||||
_args['force'] = (force)
|
_args['force'] = force
|
||||||
if requires_pre_auth is not None:
|
if requires_pre_auth is not None:
|
||||||
_args['ipakrbrequirespreauth'] = (requires_pre_auth)
|
_args['ipakrbrequirespreauth'] = requires_pre_auth
|
||||||
if ok_as_delegate is not None:
|
if ok_as_delegate is not None:
|
||||||
_args['ipakrbokasdelegate'] = (ok_as_delegate)
|
_args['ipakrbokasdelegate'] = ok_as_delegate
|
||||||
if ok_to_auth_as_delegate is not None:
|
if ok_to_auth_as_delegate is not None:
|
||||||
_args['ipakrboktoauthasdelegate'] = (ok_to_auth_as_delegate)
|
_args['ipakrboktoauthasdelegate'] = ok_to_auth_as_delegate
|
||||||
|
|
||||||
return _args
|
return _args
|
||||||
|
|
||||||
@@ -433,9 +433,9 @@ def gen_args_smb(netbiosname, ok_as_delegate, ok_to_auth_as_delegate):
|
|||||||
if netbiosname is not None:
|
if netbiosname is not None:
|
||||||
_args['ipantflatname'] = netbiosname
|
_args['ipantflatname'] = netbiosname
|
||||||
if ok_as_delegate is not None:
|
if ok_as_delegate is not None:
|
||||||
_args['ipakrbokasdelegate'] = (ok_as_delegate)
|
_args['ipakrbokasdelegate'] = ok_as_delegate
|
||||||
if ok_to_auth_as_delegate is not None:
|
if ok_to_auth_as_delegate is not None:
|
||||||
_args['ipakrboktoauthasdelegate'] = (ok_to_auth_as_delegate)
|
_args['ipakrboktoauthasdelegate'] = ok_to_auth_as_delegate
|
||||||
|
|
||||||
return _args
|
return _args
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user