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