Skip to content

Commit

Permalink
Move some checkpoint types from list to sequences to tighter constrai…
Browse files Browse the repository at this point in the history
…n mutability

This is work from benc-mypy branch
  • Loading branch information
benclifford committed Oct 26, 2023
1 parent eeb8952 commit 8b7259f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions parsl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8b7259f

Please sign in to comment.