mirror of
https://github.com/containers/podman-compose.git
synced 2025-04-23 17:09:23 +02:00
Type hints via annotations
Signed-off-by: legobt <6wbvkn0j@anonaddy.me>
This commit is contained in:
parent
462603383c
commit
26e6651d6c
@ -7,6 +7,8 @@
|
|||||||
# https://docs.docker.com/compose/django/
|
# https://docs.docker.com/compose/django/
|
||||||
# https://docs.docker.com/compose/wordpress/
|
# https://docs.docker.com/compose/wordpress/
|
||||||
# TODO: podman pod logs --color -n -f pod_testlogs
|
# TODO: podman pod logs --color -n -f pod_testlogs
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
import asyncio.subprocess
|
import asyncio.subprocess
|
||||||
import getpass
|
import getpass
|
||||||
@ -297,6 +299,7 @@ def norm_as_list(src):
|
|||||||
given a dictionary {key1:value1, key2: None} or list
|
given a dictionary {key1:value1, key2: None} or list
|
||||||
return a list of ["key1=value1", "key2"]
|
return a list of ["key1=value1", "key2"]
|
||||||
"""
|
"""
|
||||||
|
dst: list[str]
|
||||||
if src is None:
|
if src is None:
|
||||||
dst = []
|
dst = []
|
||||||
elif isinstance(src, dict):
|
elif isinstance(src, dict):
|
||||||
@ -1659,7 +1662,7 @@ COMPOSE_DEFAULT_LS = [
|
|||||||
|
|
||||||
class PodmanCompose:
|
class PodmanCompose:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.podman = None
|
self.podman: Podman
|
||||||
self.podman_version = None
|
self.podman_version = None
|
||||||
self.environ = {}
|
self.environ = {}
|
||||||
self.exit_code = None
|
self.exit_code = None
|
||||||
|
Loading…
Reference in New Issue
Block a user