From 8b7259fb1f51ee0db41649b000af2221b2715c91 Mon Sep 17 00:00:00 2001 From: Ben Clifford Date: Fri, 15 Sep 2023 13:44:18 +0000 Subject: [PATCH] Move some checkpoint types from list to sequences to tighter constrain mutability This is work from benc-mypy branch --- parsl/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/parsl/utils.py b/parsl/utils.py index ef04490dbb..54e0c23368 100644 --- a/parsl/utils.py +++ b/parsl/utils.py @@ -7,7 +7,7 @@ import time from contextlib import contextmanager from types import TracebackType -from typing import Any, Callable, List, Tuple, Union, Generator, IO, AnyStr, Dict, Optional +from typing import Any, Callable, List, Sequence, Tuple, Union, Generator, IO, AnyStr, Dict, Optional import typeguard from typing_extensions import Type @@ -47,7 +47,7 @@ def get_version() -> str: @typeguard.typechecked -def get_all_checkpoints(rundir: str = "runinfo") -> List[str]: +def get_all_checkpoints(rundir: str = "runinfo") -> Sequence[str]: """Finds the checkpoints from all runs in the rundir. Kwargs: @@ -76,7 +76,7 @@ def get_all_checkpoints(rundir: str = "runinfo") -> List[str]: @typeguard.typechecked -def get_last_checkpoint(rundir: str = "runinfo") -> List[str]: +def get_last_checkpoint(rundir: str = "runinfo") -> Sequence[str]: """Finds the checkpoint from the last run, if one exists. Note that checkpoints are incremental, and this helper will not find