(self, updater: Callable[[Any], Any])
| 35 | return payload |
| 36 | |
| 37 | def update(self, updater: Callable[[Any], Any]) -> Any: |
| 38 | with self._lock: |
| 39 | current = self._read_unlocked() |
| 40 | updated = updater(current) |
| 41 | self._write_unlocked(updated) |
| 42 | return updated |
| 43 | |
| 44 | def _read_unlocked(self) -> Any: |
| 45 | if not self.path.exists(): |
no test coverage detected