diff --git a/balsam/_api/models.py b/balsam/_api/models.py index 71fe38aa..02f777e1 100644 --- a/balsam/_api/models.py +++ b/balsam/_api/models.py @@ -1,5 +1,5 @@ -# This file was auto-generated via /Users/misha/workflow/balsam/.venv/bin/python balsam/schemas/api_generator.py -# [git rev 2e64e31] +# This file was auto-generated via /home/misha/balsam/.venv/bin/python balsam/schemas/api_generator.py +# [git rev 46088d4] # Do *not* make changes to the API by changing this file! import datetime @@ -765,7 +765,7 @@ class BatchJob(balsam._api.bases.BatchJobBase): job_mode = Field[balsam.schemas.batchjob.JobMode]() optional_params = Field[typing.Dict[str, str]]() filter_tags = Field[typing.Dict[str, str]]() - partitions = Field[typing.Optional[typing.List[balsam.schemas.batchjob.BatchJobPartition]]]() + partitions = Field[Optional[typing.Union[typing.List[balsam.schemas.batchjob.BatchJobPartition], None]]]() site_id = Field[int]() project = Field[str]() queue = Field[str]() @@ -786,7 +786,7 @@ def __init__( queue: str, optional_params: Optional[typing.Dict[str, str]] = None, filter_tags: Optional[typing.Dict[str, str]] = None, - partitions: Optional[typing.Optional[typing.List[balsam.schemas.batchjob.BatchJobPartition]]] = None, + partitions: Optional[typing.Union[typing.List[balsam.schemas.batchjob.BatchJobPartition], None]] = None, **kwargs: Any, ) -> None: """ @@ -918,7 +918,7 @@ def create( queue: str, optional_params: Optional[typing.Dict[str, str]] = None, filter_tags: Optional[typing.Dict[str, str]] = None, - partitions: Optional[typing.Optional[typing.List[balsam.schemas.batchjob.BatchJobPartition]]] = None, + partitions: Optional[typing.Union[typing.List[balsam.schemas.batchjob.BatchJobPartition], None]] = None, ) -> BatchJob: """ Create a new BatchJob object and save it to the API in one step. diff --git a/balsam/site/service/transfer.py b/balsam/site/service/transfer.py index 8b574b16..8219d857 100644 --- a/balsam/site/service/transfer.py +++ b/balsam/site/service/transfer.py @@ -3,7 +3,7 @@ from itertools import islice from math import ceil from pathlib import Path -from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Tuple, cast +from typing import TYPE_CHECKING, Any, Dict, Iterable, List, Tuple, cast, DefaultDict from urllib.parse import urlparse from balsam.platform.transfer import TaskInfo, TransferInterface, TransferRetryableError, TransferSubmitError @@ -57,7 +57,7 @@ def __init__( self.num_items_query_limit = num_items_query_limit @staticmethod - def build_task_map(transfer_items: Iterable["TransferItem"]) -> "defaultdict[str, List[TransferItem]]": + def build_task_map(transfer_items: Iterable["TransferItem"]) -> "DefaultDict[str, List[TransferItem]]": task_map = defaultdict(list) for item in transfer_items: task_map[item.task_id].append(item)