mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Python code modernization, 5/n (#1165)
* Address raise-missing-from. * Address simplifiable-if-expression. * Address unnecessary-dunder-call. * Address unnecessary-pass. * Address use-list-literal. * Address unused-variable. * Address use-dict-literal.
This commit is contained in:
@@ -87,9 +87,9 @@ from ansible_collections.community.docker.plugins.module_utils._common_api impor
|
||||
|
||||
|
||||
def main():
|
||||
argument_spec = dict(
|
||||
name=dict(type="str", required=True),
|
||||
)
|
||||
argument_spec = {
|
||||
"name": {"type": "str", "required": True},
|
||||
}
|
||||
|
||||
client = AnsibleDockerClient(
|
||||
argument_spec=argument_spec,
|
||||
@@ -101,7 +101,7 @@ def main():
|
||||
|
||||
client.module.exit_json(
|
||||
changed=False,
|
||||
exists=(True if container else False),
|
||||
exists=bool(container),
|
||||
container=container,
|
||||
)
|
||||
except DockerException as e:
|
||||
|
||||
Reference in New Issue
Block a user