Skip to content

Commit 1aadc8f

Browse files
committed
Union removed
1 parent bd2244c commit 1aadc8f

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

src/opengeodeweb_viewer/utils_functions.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
type ColorDict = dict[str, int]
1414
type RpcParamsWithColor = dict[str, JsonPrimitive | ColorDict]
1515
type RpcParamsWithList = dict[str, JsonPrimitive | list[str]]
16-
type RpcTestParams = list[
17-
dict[str, str | int | float | bool | dict[str, int] | list[str]] | int
18-
] | None
1916

2017

2118
def get_schemas_dict(path):

src/opengeodeweb_viewer/vtk_protocol.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Standard library imports
22
import os
3-
from typing import Union
43

54
# Third party imports
65
import vtk
@@ -19,13 +18,13 @@ def __init__(self) -> None:
1918
self.DataReader = vtk.vtkXMLPolyDataReader()
2019
self.ImageReader = vtk.vtkXMLImageDataReader()
2120

22-
def get_data_base(self) -> dict[str, dict[str, Union[object, str]]]:
21+
def get_data_base(self) -> dict[str, dict[str, object | str]]:
2322
return self.getSharedObject("db")
2423

25-
def get_object(self, id: str) -> dict[str, Union[object, str]]:
24+
def get_object(self, id: str) -> dict[str, object | str]:
2625
return self.get_data_base()[id]
2726

28-
def get_data(self, data_id: str) -> dict[str, Union[str, list[str], None]]:
27+
def get_data(self, data_id: str) -> dict[str, str | list[str] | None]:
2928
if Data is None:
3029
raise Exception("Data model not available")
3130

@@ -86,7 +85,7 @@ def register_object(
8685
filter: vtk.vtkAlgorithm,
8786
actor: vtk.vtkActor,
8887
mapper: vtk.vtkMapper,
89-
textures: dict[str, Union[str, int, float]],
88+
textures: dict[str, str | int | float],
9089
) -> None:
9190
self.get_data_base()[id] = {
9291
"reader": reader,

src/tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
from opengeodeweb_microservice.database.data import Data
1414
from opengeodeweb_viewer.utils_functions import RpcTestParams
1515

16+
type RpcTestParams = list[
17+
dict[str, str | int | float | bool | dict[str, int] | list[str]] | int
18+
] | None
19+
1620

1721
class ServerMonitor:
1822
def __init__(self, log: str) -> None:

0 commit comments

Comments
 (0)