diff --git a/spalloc_client/job.py b/spalloc_client/job.py index 3376e4a63..05e12f0e7 100644 --- a/spalloc_client/job.py +++ b/spalloc_client/job.py @@ -19,7 +19,7 @@ import subprocess import time from types import TracebackType -from typing import Any, cast, Dict, Optional, Tuple, Type +from typing import Any, cast, Dict, Optional, Tuple, Type, Union import sys from typing_extensions import Literal, Self @@ -127,7 +127,7 @@ class Job(object): allocated. """ - def __init__(self, *args: int, **kwargs: Dict[str, Any]): + def __init__(self, *args: int, **kwargs: Union[float, str, None]): """ Request a SpiNNaker machine. A :py:class:`.Job` is constructed in one of the following styles:: diff --git a/spalloc_client/scripts/alloc.py b/spalloc_client/scripts/alloc.py index 5575142d8..057028340 100644 --- a/spalloc_client/scripts/alloc.py +++ b/spalloc_client/scripts/alloc.py @@ -427,7 +427,8 @@ def parse_argv(argv: Optional[List[str]]) -> Tuple[ return parser, parser.parse_args(argv) -def run_job(job_args: List[int], job_kwargs: Dict[str, Any], +def run_job(job_args: List[int], + job_kwargs: Dict[str, Union[float, str, None]], ip_file_filename: str) -> int: """ Run a job @@ -497,7 +498,7 @@ def main(argv: Optional[List[str]] = None) -> int: parser.error("--hostname of spalloc server must be specified") # Set universal job arguments - job_kwargs = { + job_kwargs: Dict[str, Union[float, str, None]] = { "hostname": arguments.hostname, "port": arguments.port, "reconnect_delay": _minzero(arguments.reconnect_delay),