make type checking more strict

This commit is contained in:
Jörg Thalheim
2023-11-30 13:42:15 +01:00
parent 65cdd51af2
commit 780ffb9c8f
9 changed files with 49 additions and 31 deletions

View File

@@ -36,7 +36,7 @@ def retry(fn: Callable, timeout: int = 900) -> None:
class Machine:
def __init__(self, name: str, toplevel: Path, rootdir: Path, out_dir: str):
def __init__(self, name: str, toplevel: Path, rootdir: Path, out_dir: str) -> None:
self.name = name
self.toplevel = toplevel
self.out_dir = out_dir
@@ -198,7 +198,7 @@ class Machine:
timing out.
"""
def check_active(_: Any) -> bool:
def check_active(_: bool) -> bool:
info = self.get_unit_info(unit)
state = info["ActiveState"]
if state == "failed":
@@ -247,7 +247,7 @@ def setup_filesystems() -> None:
class Driver:
def __init__(self, containers: list[Path], testscript: str, out_dir: str):
def __init__(self, containers: list[Path], testscript: str, out_dir: str) -> None:
self.containers = containers
self.testscript = testscript
self.out_dir = out_dir