Document wrapper

This commit is contained in:
Hugo Osvaldo Barrera 2025-09-20 12:50:00 +02:00
parent 1502f5b5f4
commit 59c1c55407

View file

@ -24,6 +24,13 @@ logger = logging.getLogger(__name__)
def _writing_op(f): 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) @functools.wraps(f)
async def inner(self, *args, **kwargs): async def inner(self, *args, **kwargs):
if self._items is None or not self._at_once: if self._items is None or not self._at_once: