Address consider-using-dict-comprehension.

This commit is contained in:
Felix Fontein 2025-10-11 14:29:35 +02:00
parent ae53065001
commit 8acdc3c851
4 changed files with 7 additions and 14 deletions

View File

@ -381,7 +381,6 @@ disable=raw-checker-failed,
# To clean up:
abstract-method,
arguments-differ,
consider-using-dict-comprehension,
consider-using-f-string,
consider-using-in,
consider-using-max-builtin,

View File

@ -56,13 +56,11 @@ DOCKER_COMMON_ARGS = dict(
debug=dict(type="bool", default=False),
)
DOCKER_COMMON_ARGS_VARS = dict(
[
[option_name, f"ansible_docker_{option_name}"]
for option_name in DOCKER_COMMON_ARGS
if option_name != "debug"
]
)
DOCKER_COMMON_ARGS_VARS = {
option_name: f"ansible_docker_{option_name}"
for option_name in DOCKER_COMMON_ARGS
if option_name != "debug"
}
DOCKER_MUTUALLY_EXCLUSIVE = []

View File

@ -40,6 +40,4 @@ class AnsibleDockerClient(AnsibleDockerClientBase):
)
def _get_params(self):
return dict(
[(option, self.plugin.get_option(option)) for option in DOCKER_COMMON_ARGS]
)
return {option: self.plugin.get_option(option) for option in DOCKER_COMMON_ARGS}

View File

@ -37,6 +37,4 @@ class AnsibleDockerClient(AnsibleDockerClientBase):
)
def _get_params(self):
return dict(
[(option, self.plugin.get_option(option)) for option in DOCKER_COMMON_ARGS]
)
return {option: self.plugin.get_option(option) for option in DOCKER_COMMON_ARGS}