updates type hints for serialized objects

This commit is contained in:
Mose Müller
2024-03-06 17:49:46 +01:00
parent c7d452d7db
commit 4aee899dbe
8 changed files with 148 additions and 74 deletions

View File

@ -11,6 +11,7 @@ from pydase.data_service.task_manager import TaskStatus
from pydase.utils.decorators import frontend
from pydase.utils.serializer import (
SerializationPathError,
SerializedObject,
dump,
get_nested_dict_by_path,
get_next_level_dict_by_key,
@ -464,12 +465,12 @@ def test_update_task_state(setup_dict: dict[str, Any]) -> None:
}
def test_update_list_entry(setup_dict: dict[str, Any]) -> None:
def test_update_list_entry(setup_dict: dict[str, SerializedObject]) -> None:
set_nested_value_by_path(setup_dict, "attr_list[1]", 20)
assert setup_dict["attr_list"]["value"][1]["value"] == 20
def test_update_list_append(setup_dict: dict[str, Any]) -> None:
def test_update_list_append(setup_dict: dict[str, SerializedObject]) -> None:
set_nested_value_by_path(setup_dict, "attr_list[3]", 20)
assert setup_dict["attr_list"]["value"][3]["value"] == 20