From 5e87dd4820f9e5bbd57a74c283f9107cf872b026 Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Wed, 27 Nov 2024 13:56:40 +0000 Subject: [PATCH] pylint fixes --- spalloc_client/_utils.py | 2 ++ spalloc_client/job.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/spalloc_client/_utils.py b/spalloc_client/_utils.py index 8c9cf802e..675a21506 100644 --- a/spalloc_client/_utils.py +++ b/spalloc_client/_utils.py @@ -18,6 +18,8 @@ def time_left_float(timestamp: float) -> float: + """ Convert a not None timestamp into how long to wait for it. + """ return max(0.0, timestamp - time.time()) diff --git a/spalloc_client/job.py b/spalloc_client/job.py index 676b54595..90a1bff55 100644 --- a/spalloc_client/job.py +++ b/spalloc_client/job.py @@ -165,12 +165,12 @@ def __init__(self, *args: int, hostname: Optional[str] = NO_STR, port: Optional[int] = NO_INT, reconnect_delay: Optional[float] = NO_INT, timeout: Optional[float] = NO_INT, - config_filenames: Optional[List[str]] = [NO_STR], + config_filenames: Optional[List[str]] = list([NO_STR]), resume_job_id: Optional[int] = None, owner: Optional[str] = NO_STR, keepalive: Optional[float] = NO_INT, machine: Optional[str] = NO_STR, - tags: Optional[List[str]] = [NO_STR], + tags: Optional[List[str]] = list([NO_STR]), min_ratio: Optional[float] = NO_INT, max_dead_boards: Optional[int] = NO_INT, max_dead_links: Optional[int] = NO_INT,