Skip to content

Commit b8b8c68

Browse files
fix typecheck
1 parent fa9028c commit b8b8c68

File tree

1 file changed

+4
-4
lines changed
  • services/director-v2/src/simcore_service_director_v2/utils

1 file changed

+4
-4
lines changed

services/director-v2/src/simcore_service_director_v2/utils/dask.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import collections
33
import logging
44
from collections.abc import Awaitable, Callable, Coroutine, Generator
5-
from typing import Any, Final, NoReturn, Optional, ParamSpec, TypeVar, cast, get_args
5+
from typing import Any, Final, NoReturn, ParamSpec, TypeVar, cast, get_args
66
from uuid import uuid4
77

88
import dask_gateway # type: ignore[import-untyped]
@@ -61,7 +61,7 @@
6161
ServiceKeyStr = str
6262
ServiceVersionStr = str
6363

64-
_PVType = Optional[_NPItemValue]
64+
_PVType = _NPItemValue | None
6565

6666
assert len(get_args(_PVType)) == len( # nosec
6767
get_args(PortValue)
@@ -73,7 +73,7 @@ def _get_port_validation_errors(port_key: str, err: ValidationError) -> list[Err
7373
for error in errors:
7474
assert error["loc"][-1] != (port_key,)
7575
error["loc"] = error["loc"] + (port_key,)
76-
return errors
76+
return list(errors)
7777

7878

7979
def generate_dask_job_id(
@@ -134,7 +134,7 @@ async def create_node_ports(
134134
db_manager=db_manager,
135135
)
136136
except ValidationError as err:
137-
raise PortsValidationError(project_id, node_id, err.errors()) from err
137+
raise PortsValidationError(project_id, node_id, list(err.errors())) from err
138138

139139

140140
async def parse_output_data(

0 commit comments

Comments
 (0)