[PATCH 2/3] python/notmuch2: docstrings for Database.threads(), Database.count_threads()

Subject: [PATCH 2/3] python/notmuch2: docstrings for Database.threads(), Database.count_threads()

Date: Wed, 6 Jan 2021 10:08:41 +0100

To: notmuch@notmuchmail.org

Cc:

From: Michael J Gruber


Signed-off-by: Michael J Gruber <git@grubix.eu>
---
 bindings/python-cffi/notmuch2/_database.py | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/bindings/python-cffi/notmuch2/_database.py b/bindings/python-cffi/notmuch2/_database.py
index 31b282f6..7592956a 100644
--- a/bindings/python-cffi/notmuch2/_database.py
+++ b/bindings/python-cffi/notmuch2/_database.py
@@ -622,6 +622,15 @@ class Database(base.NotmuchObject):
                 omit_excluded=EXCLUDE.TRUE,
                 sort=SORT.UNSORTED,  # Check this default
                 exclude_tags=None):
+        """Search the database for threads.
+
+        :returns: An iterator over the threads found.
+        :rtype: ThreadIter
+
+        :raises OutOfMemoryError: if no memory is available to
+           allocate the query.
+        :raises ObjectDestroyedError: if used after destroyed.
+        """
         query = self._create_query(query,
                                    omit_excluded=omit_excluded,
                                    sort=sort,
@@ -632,6 +641,15 @@ class Database(base.NotmuchObject):
                       omit_excluded=EXCLUDE.TRUE,
                       sort=SORT.UNSORTED,  # Check this default
                       exclude_tags=None):
+        """Search the database for threads and count.
+
+        :returns: The number of threads found.
+        :rtype: int
+
+        :raises OutOfMemoryError: if no memory is available to
+           allocate the query.
+        :raises ObjectDestroyedError: if used after destroyed.
+        """
         query = self._create_query(query,
                                    omit_excluded=omit_excluded,
                                    sort=sort,
-- 
2.30.0.rc0.297.gbcca948854
_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: