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:
Felix Fontein
2025-10-12 16:02:27 +02:00
committed by GitHub
parent cad22de628
commit c75aa5dd64
66 changed files with 1549 additions and 1429 deletions
+15 -15
View File
@@ -263,21 +263,21 @@ class ExecManager(BaseComposeManager):
def main():
argument_spec = dict(
service=dict(type="str", required=True),
index=dict(type="int"),
argv=dict(type="list", elements="str"),
command=dict(type="str"),
chdir=dict(type="str"),
detach=dict(type="bool", default=False),
user=dict(type="str"),
stdin=dict(type="str"),
stdin_add_newline=dict(type="bool", default=True),
strip_empty_ends=dict(type="bool", default=True),
privileged=dict(type="bool", default=False),
tty=dict(type="bool", default=True),
env=dict(type="dict"),
)
argument_spec = {
"service": {"type": "str", "required": True},
"index": {"type": "int"},
"argv": {"type": "list", "elements": "str"},
"command": {"type": "str"},
"chdir": {"type": "str"},
"detach": {"type": "bool", "default": False},
"user": {"type": "str"},
"stdin": {"type": "str"},
"stdin_add_newline": {"type": "bool", "default": True},
"strip_empty_ends": {"type": "bool", "default": True},
"privileged": {"type": "bool", "default": False},
"tty": {"type": "bool", "default": True},
"env": {"type": "dict"},
}
argspec_ex = common_compose_argspec_ex()
argument_spec.update(argspec_ex.pop("argspec"))