Full type coverage with mypy

This commit is contained in:
Cian Hughes
2023-11-01 16:41:15 +00:00
parent baf5962f34
commit df07bc2bc4
7 changed files with 70 additions and 29 deletions

View File

@@ -1,5 +1,6 @@
from pathlib import Path
from types import SimpleNamespace
from typing import Union
import docker
import tomllib
@@ -9,7 +10,7 @@ CLIENT = docker.from_env(version="auto")
MAX_PORT: int = 65535
PROJECT_ROOT: Path = Path(__file__).parent.parent.parent.absolute()
type ConfigLabel = str | list[str]
ConfigLabel = Union[str, list[str]] # After PEP695 support: type ConfigLabel = str | list[str]
class Config(SimpleNamespace):