diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-05-30 11:39:57 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2023-06-14 13:58:42 +0200 |
commit | 0985eaadc9401f7242029deb005089b1f827cfe3 (patch) | |
tree | e61f10fb55a03ab4d2ab80c6f21e923eac3975a6 /rtemsspec | |
parent | 043689c061263d6b0266b679dd5f88d14a58006c (diff) |
items: Return empty type string by default
Diffstat (limited to 'rtemsspec')
-rw-r--r-- | rtemsspec/items.py | 1 | ||||
-rw-r--r-- | rtemsspec/tests/test_items_item.py | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/rtemsspec/items.py b/rtemsspec/items.py index 4b57cee6..da68d4f3 100644 --- a/rtemsspec/items.py +++ b/rtemsspec/items.py @@ -207,6 +207,7 @@ class Item: # pylint: disable=too-many-public-methods def __init__(self, item_cache: "ItemCache", uid: str, data: Any): + data["_type"] = "" self._cache = item_cache self._ident = _UID_TO_UPPER.sub(_match_to_upper, uid) self._uid = uid diff --git a/rtemsspec/tests/test_items_item.py b/rtemsspec/tests/test_items_item.py index 1b4dd9f4..a834097b 100644 --- a/rtemsspec/tests/test_items_item.py +++ b/rtemsspec/tests/test_items_item.py @@ -84,7 +84,7 @@ def test_data(): data = {} data["x"] = "y" item = Item(EmptyItemCache(), "z", data) - assert item.data == {"x": "y"} + assert item.data == {"_type": "", "x": "y"} def test_cache(): |