File tree Expand file tree Collapse file tree 5 files changed +9
-12
lines changed
packages/service-library/src/servicelib/fastapi
director-v2/src/simcore_service_director_v2/modules
db/repositories/comp_tasks
dynamic_sidecar/docker_service_specs
dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules
storage/src/simcore_service_storage Expand file tree Collapse file tree 5 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 2323}
2424
2525
26- TException = TypeVar ("TException" )
26+ TException = TypeVar ("TException" , bound = BaseException )
2727
2828_logger = logging .getLogger (__name__ )
2929
Original file line number Diff line number Diff line change 11import asyncio
22import logging
33from decimal import Decimal
4- from typing import Any , Final , cast
4+ from typing import Any , Final
55
66import arrow
77from dask_task_models_library .container_tasks .protocol import ContainerEnvsDict
1919from models_library .resource_tracker import HardwareInfo
2020from models_library .service_settings_labels import (
2121 SimcoreServiceLabels ,
22- SimcoreServiceSettingsLabel ,
2322)
2423from models_library .services import (
2524 ServiceKey ,
@@ -118,7 +117,7 @@ def _compute_node_boot_mode(node_resources: ServiceResourcesDict) -> BootMode:
118117
119118def _compute_node_envs (node_labels : SimcoreServiceLabels ) -> ContainerEnvsDict :
120119 node_envs = {}
121- for service_setting in cast ( SimcoreServiceSettingsLabel , node_labels .settings ) :
120+ for service_setting in node_labels .settings :
122121 if service_setting .name == "env" :
123122 for complete_env in service_setting .value :
124123 parts = complete_env .split ("=" )
Original file line number Diff line number Diff line change 11import logging
22from collections import deque
3- from typing import Any , cast
3+ from typing import Any
44
55from common_library .json_serialization import json_dumps , json_loads
66from models_library .basic_types import EnvVarKey , PortInt
@@ -495,9 +495,7 @@ async def merge_settings_before_use(
495495
496496 # merge the settings from the all the involved services
497497 for compose_spec_key , service_labels in labels_for_involved_services .items ():
498- service_settings : SimcoreServiceSettingsLabel = cast (
499- SimcoreServiceSettingsLabel , service_labels .settings
500- )
498+ service_settings : SimcoreServiceSettingsLabel = service_labels .settings
501499 settings .extend (
502500 # inject compose spec key, used to target container specific services
503501 _add_compose_destination_containers_to_settings_entries (
Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ async def iter_state_paths_to_docker_volumes(
162162def setup_mounted_fs (app : FastAPI ) -> MountedVolumes :
163163 settings : ApplicationSettings = app .state .settings
164164
165- app .state .mounted_volumes = MountedVolumes (
165+ app .state .mounted_volumes = mounted_volumes = MountedVolumes (
166166 service_run_id = settings .DY_SIDECAR_RUN_ID ,
167167 node_id = settings .DY_SIDECAR_NODE_ID ,
168168 inputs_path = settings .DY_SIDECAR_PATH_INPUTS ,
@@ -174,4 +174,4 @@ def setup_mounted_fs(app: FastAPI) -> MountedVolumes:
174174 dy_volumes = settings .DYNAMIC_SIDECAR_DY_VOLUMES_MOUNT_DIR ,
175175 )
176176
177- return app . state . mounted_volumes
177+ return mounted_volumes
Original file line number Diff line number Diff line change 77from contextlib import suppress
88from dataclasses import dataclass
99from pathlib import Path
10- from typing import Any , Final , cast
10+ from typing import Any , Final
1111
1212from aws_library .s3 import (
1313 CopiedBytesTransferredCallback ,
@@ -634,7 +634,7 @@ async def create_file_download_link(
634634 4. Raises FileAccessRightError if the user does not have access to the file
635635 """
636636 directory_file_id = await get_directory_file_id (
637- get_db_engine (self .app ), cast ( SimcoreS3FileID , file_id )
637+ get_db_engine (self .app ), file_id
638638 )
639639 can = await AccessLayerRepository .instance (
640640 get_db_engine (self .app )
You can’t perform that action at this time.
0 commit comments