From 7c156ff81e9c6f1686f256378f3d12fcc7a46ac4 Mon Sep 17 00:00:00 2001
From: Jean-Paul Calderone <exarkun@twistedmatrix.com>
Date: Thu, 28 May 2020 09:33:32 -0400
Subject: [PATCH] docstring

---
 src/_zkapauthorizer/model.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/_zkapauthorizer/model.py b/src/_zkapauthorizer/model.py
index 7803337..12b0393 100644
--- a/src/_zkapauthorizer/model.py
+++ b/src/_zkapauthorizer/model.py
@@ -186,6 +186,12 @@ def open_and_initialize(path, connect=None):
 
 
 def with_cursor(f):
+    """
+    Decorate a function so it is automatically passed a cursor with an active
+    transaction as the first positional argument.  If the function returns
+    normally then the transaction will be committed.  Otherwise, the
+    transaction will be rolled back.
+    """
     @wraps(f)
     def with_cursor(self, *a, **kw):
         with self._connection:
-- 
GitLab