MCPcopy Create free account
hub / github.com/ehForwarderBot/ehForwarderBot / __getstate__

Method __getstate__

ehforwarderbot/message.py:546–555  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

544 self.substitutions.verify()
545
546 def __getstate__(self):
547 state = self.__dict__.copy()
548 # Remove file object
549 if state.get('file', None) is not None:
550 del state['file']
551
552 # Convert channel object to channel ID
553 if state['deliver_to'] is not None:
554 state['deliver_to'] = state['deliver_to'].channel_id
555 return state
556
557 def __setstate__(self, state: Dict[str, Any]):
558 self.__dict__.update(state)

Callers

nothing calls this directly

Calls 1

copyMethod · 0.80

Tested by

no test coverage detected