- fix some pickling issues

This commit is contained in:
Wim Pomp
2025-05-06 15:37:04 +02:00
parent cbb135e13e
commit f1add2f8ad
3 changed files with 10 additions and 38 deletions

View File

@@ -27,6 +27,12 @@ class Ome(UserDict):
else:
return new
def __getstate__(self) -> dict[str, Any]:
return self.data
def __setstate__(self, state: dict[str, Any]) -> None:
self.data = state
class OmeList(UserList):
def __getitem__(self, item: int) -> Ome | OmeList | int | float | str: