Type hints via annotations

Signed-off-by: legobt <6wbvkn0j@anonaddy.me>
This commit is contained in:
legobt 2024-08-02 23:48:52 +00:00
parent 462603383c
commit 26e6651d6c
No known key found for this signature in database
GPG Key ID: C5F28D4B2B8927AB

View File

@ -7,6 +7,8 @@
# https://docs.docker.com/compose/django/
# https://docs.docker.com/compose/wordpress/
# TODO: podman pod logs --color -n -f pod_testlogs
from __future__ import annotations
import argparse
import asyncio.subprocess
import getpass
@ -297,6 +299,7 @@ def norm_as_list(src):
given a dictionary {key1:value1, key2: None} or list
return a list of ["key1=value1", "key2"]
"""
dst: list[str]
if src is None:
dst = []
elif isinstance(src, dict):
@ -1659,7 +1662,7 @@ COMPOSE_DEFAULT_LS = [
class PodmanCompose:
def __init__(self):
self.podman = None
self.podman: Podman
self.podman_version = None
self.environ = {}
self.exit_code = None