Skip to content

Commit 80ecd47

Browse files
committed
Make Obj picklable
1 parent d28215a commit 80ecd47

File tree

1 file changed

+6
-0
lines changed
  • mautrix/client/api/types/util

1 file changed

+6
-0
lines changed

mautrix/client/api/types/util/obj.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ def __str__(self):
3333
def __repr__(self):
3434
return repr(self.serialize())
3535

36+
def __getstate__(self):
37+
return self.__dict__
38+
39+
def __setstate__(self, state):
40+
self.__dict__.update(state)
41+
3642
def __bool__(self):
3743
return bool(self.__dict__)
3844

0 commit comments

Comments
 (0)