type hint

This commit is contained in:
John Lancaster
2024-05-28 18:33:12 -05:00
parent 5b8221ef77
commit cae3f2bbf4

View File

@@ -18,7 +18,7 @@ def manage_containers(project: str, services: list[str]):
for c in client.containers.list()
if c.labels['com.docker.compose.project'] == project
)
service_dict = {
service_dict: dict[str, Container] = {
c.labels['com.docker.compose.service']: c for c in project_containers
}
containers: list[Container] = [service_dict[s] for s in services]