(self, state)
| 286 | } |
| 287 | |
| 288 | def __setstate__(self, state): |
| 289 | cid_count = state.pop('_cid_gen') |
| 290 | vars(self).update(state) |
| 291 | self.callbacks = { |
| 292 | s: {cid: _weak_or_strong_ref(func, functools.partial(self._remove_proxy, s)) |
| 293 | for cid, func in d.items()} |
| 294 | for s, d in self.callbacks.items()} |
| 295 | self._func_cid_map = _UnhashDict( |
| 296 | ((s, proxy), cid) |
| 297 | for s, d in self.callbacks.items() for cid, proxy in d.items()) |
| 298 | self._cid_gen = itertools.count(cid_count) |
| 299 | |
| 300 | def connect(self, signal, func): |
| 301 | """Register *func* to be called when signal *signal* is generated.""" |
nothing calls this directly
no test coverage detected