Skip to content

Commit

Permalink
fix more possible compatibility conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
somsonson committed Feb 10, 2025
1 parent 813e961 commit b26f1b4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions api/server/services/aas_registry_server_service.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, MutableMapping, List
from typing import Any, MutableMapping, List, Union

from aas_core3 import jsonization
from aas_core3.types import AssetAdministrationShell, ConceptDescription
Expand Down Expand Up @@ -38,7 +38,7 @@ def GetAllAssetAdministrationShellDescriptors(self) -> List[str]:
return [jsonization.to_jsonable(descriptor) for descriptor in aas_descriptors_store]

def GetAssetAdministrationShellDescriptorById(self, descriptor_id) \
-> list[bool | int | float | str | list[Any] | MutableMapping[str, Any]]:
-> List[Union[bool, int, float, str, List[Any], MutableMapping[str, Any]]]:
aas_descriptor = self.obj_store.get_identifiable(descriptor_id)
assert isinstance(aas_descriptor, ConceptDescription)
return jsonization.to_jsonable(aas_descriptor)
Expand Down
4 changes: 2 additions & 2 deletions api/server/services/aasx_flie_server_service.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, MutableMapping, List
from typing import Any, MutableMapping, List, Union

from aas_core3.types import AssetAdministrationShell
from aas_core3 import jsonization
Expand All @@ -15,7 +15,7 @@ def GetAllAASXPackageIds(self) -> List[str]:
return [item.id for item in self.obj_store if isinstance(item, AssetAdministrationShell)]

def GetAASXByPackageId(self, package_id) \
-> list[bool | int | float | str | list[Any] | MutableMapping[str, Any]]:
-> List[Union[bool, int, float, str, List[Any], MutableMapping[str, Any]]]:
aasx_package = self.obj_store.get_identifiable(package_id)
assert isinstance(aasx_package, AssetAdministrationShell)
return jsonization.to_jsonable(aasx_package)
Expand Down
4 changes: 2 additions & 2 deletions api/server/services/submodel_registry_server_service.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Any, MutableMapping, List
from typing import Any, MutableMapping, List, Union

from aas_core3 import jsonization
from aas_core3.types import Submodel, ConceptDescription
Expand Down Expand Up @@ -40,7 +40,7 @@ def GetAllSubmodelDescriptors(self) -> List[str]:
return [jsonization.to_jsonable(descriptor) for descriptor in submodel_descriptors_store]

def GetSubmodelDescriptorById(self, descriptor_id) \
-> list[bool | int | float | str | list[Any] | MutableMapping[str, Any]]:
-> List[Union[bool, int, float, str, List[Any], MutableMapping[str, Any]]]:
try:
aas_descriptor = self.obj_store.get_identifiable(descriptor_id)
except KeyError as e:
Expand Down
2 changes: 1 addition & 1 deletion api/server/services/submodel_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _get_submodel_element_by_id_short(self, submodel_id, element_id_short):

# Endpoint specific logic
def get_all_submodels_as_jsonables(self) \
-> list[bool | int | float | str | list[Any] | MutableMapping[str, Any]]:
-> List[Union[bool, int, float, str, List[Any], MutableMapping[str, Any]]]:
return self._jsonable_submodels(self._get_all_submodels())

def add_submodel_from_body(self, json):
Expand Down

0 comments on commit b26f1b4

Please sign in to comment.