From 59c1c55407e2a848b2486d953488dc61e5a0e43e Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 20 Sep 2025 12:50:00 +0200 Subject: [PATCH] Document wrapper --- vdirsyncer/storage/singlefile.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vdirsyncer/storage/singlefile.py b/vdirsyncer/storage/singlefile.py index 07f2e31..3732849 100644 --- a/vdirsyncer/storage/singlefile.py +++ b/vdirsyncer/storage/singlefile.py @@ -24,6 +24,13 @@ logger = logging.getLogger(__name__) def _writing_op(f): + """Implement at_once for write operations. + + Wrap an operation which writes to the storage, implementing `at_once` if it has been + requested. Changes are stored in-memory until the at_once block finishes, at which + time they are all written at once. + """ + @functools.wraps(f) async def inner(self, *args, **kwargs): if self._items is None or not self._at_once: