Verified Commit 7af2ce3c authored by Jakob Moser's avatar Jakob Moser
Browse files

Change Packet to use Mapping instead of dict

parent bf3f9d34
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -5,5 +5,7 @@ values can be a number of primitives, lists, or other dicts which can be easily
Forbidden are values which are not primitives, e.g., any sort of more complex Python objects.
"""

from collections.abc import Mapping

type Primitive = str | int | float | bool | None
type Packet = dict[str, Primitive | Packet | list[Primitive | Packet]]
type Packet = Mapping[str, Primitive | Packet | list[Primitive | Packet]]