Skip to content

Commit db2d5d2

Browse files
committed
more py3.8 compatibility changes
1 parent 084fa56 commit db2d5d2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clients/python/test/test_osparc/conftest.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import json
1515
from tempfile import NamedTemporaryFile
1616
from pathlib import Path
17-
from typing import Any, TypeVar, NamedTuple, Final, cast, Dict, Type
17+
from typing import Any, TypeVar, NamedTuple, Final, cast, Dict, Type, Set
1818
from urllib.parse import urlparse
1919
from parse import parse, with_pattern
2020

@@ -67,7 +67,7 @@ class ServerPath(NamedTuple):
6767

6868

6969
@pytest.fixture
70-
def all_server_paths(osparc_openapi_specs: Dict[str, Any]) -> set[ServerPath]:
70+
def all_server_paths(osparc_openapi_specs: Dict[str, Any]) -> Set[ServerPath]:
7171
server_paths = set()
7272
for path in osparc_openapi_specs["paths"]:
7373
for method in osparc_openapi_specs["paths"][path]:
@@ -89,7 +89,7 @@ def all_server_paths(osparc_openapi_specs: Dict[str, Any]) -> set[ServerPath]:
8989

9090
@pytest.fixture
9191
def create_osparc_response_model(
92-
osparc_openapi_specs: dict[str, Any],
92+
osparc_openapi_specs: Dict[str, Any],
9393
) -> Callable[[Type[T]], T]:
9494
def _create_model(model_type: type[T]) -> T:
9595
schemas = osparc_openapi_specs.get("components", {}).get("schemas", {})
@@ -105,8 +105,8 @@ def _create_model(model_type: type[T]) -> T:
105105
@pytest.fixture
106106
def create_server_mock(
107107
mocker: MockerFixture,
108-
osparc_openapi_specs: dict[str, Any],
109-
all_server_paths: set[ServerPath],
108+
osparc_openapi_specs: Dict[str, Any],
109+
all_server_paths: Set[ServerPath],
110110
create_osparc_response_model: Callable[[str], BaseModel],
111111
) -> Callable[[int], None]:
112112
def _mock_server(_status: int) -> None:

0 commit comments

Comments
 (0)