fix pylint

This commit is contained in:
Muayyad alsadi 2023-04-09 13:10:33 +03:00
parent 990f774659
commit dfb64d884d

View File

@ -173,8 +173,13 @@ def parse_short_mount(mount_str, basedir):
else:
# TODO: ignore
raise ValueError("unknown mount option " + opt)
mount_opt_dict["bind"] = dict(propagation=",".join(propagation_opts))
return dict(type=mount_type, source=mount_src, target=mount_dst, **mount_opt_dict)
mount_opt_dict["bind"] = {"propagation": ",".join(propagation_opts)}
return {
"type": mount_type,
"source": mount_src,
"target": mount_dst,
**mount_opt_dict,
}
# NOTE: if a named volume is used but not defined it
@ -342,7 +347,7 @@ def transform(args, project_name, given_containers):
pods = []
else:
pod_name = f"pod_{project_name}"
pod = dict(name=pod_name)
pod = {"name": pod_name}
pods = [pod]
containers = []
for cnt in given_containers:
@ -1590,9 +1595,12 @@ class PodmanCompose:
name = name0
container_names_by_service[service_name].append(name)
# log(service_name,service_desc)
cnt = dict(
name=name, num=num, service_name=service_name, **service_desc
)
cnt = {
"name": name,
"num": num,
"service_name": service_name,
**service_desc,
}
if "image" not in cnt:
cnt["image"] = f"{project_name}_{service_name}"
labels = norm_as_list(cnt.get("labels", None))
@ -1926,7 +1934,7 @@ def build_one(compose, args, cnt):
return
build_desc = cnt["build"]
if not hasattr(build_desc, "items"):
build_desc = dict(context=build_desc)
build_desc = {"context": build_desc}
ctx = build_desc.get("context", ".")
dockerfile = build_desc.get("dockerfile", None)
if dockerfile: