1414import json
1515from tempfile import NamedTemporaryFile
1616from 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
1818from urllib .parse import urlparse
1919from 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
9191def 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
106106def 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