From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id MOagOSt+9V9sQwAA0tVLHw (envelope-from ) for ; Wed, 06 Jan 2021 09:08:59 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id UJ1pNSt+9V9uDgAAB5/wlQ (envelope-from ) for ; Wed, 06 Jan 2021 09:08:59 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (2048 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A6820940414 for ; Wed, 6 Jan 2021 09:08:59 +0000 (UTC) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id BAFA629D40; Wed, 6 Jan 2021 04:08:49 -0500 (EST) Received: from mailproxy06.manitu.net (mailproxy06.manitu.net [217.11.48.70]) by mail.notmuchmail.org (Postfix) with ESMTPS id E529E29D2C for ; Wed, 6 Jan 2021 04:08:46 -0500 (EST) Received: from localhost (200116b86027b40061b67b8d208c5aed.dip.versatel-1u1.de [IPv6:2001:16b8:6027:b400:61b6:7b8d:208c:5aed]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: michael@grubix.eu) by mailproxy06.manitu.net (Postfix) with ESMTPSA id 83688580110; Wed, 6 Jan 2021 10:08:44 +0100 (CET) From: Michael J Gruber To: notmuch@notmuchmail.org Subject: [PATCH 2/3] python/notmuch2: docstrings for Database.threads(), Database.count_threads() Date: Wed, 6 Jan 2021 10:08:41 +0100 Message-Id: <870f18d02eac595cecba04866ec4cadb1e1ed087.1609347527.git.git@grubix.eu> X-Mailer: git-send-email 2.30.0.287.g27f67507f7 In-Reply-To: References: MIME-Version: 1.0 Message-ID-Hash: 77M4MZU6T5RVNE5VVMG3AUCGMLDHJ7ET X-Message-ID-Hash: 77M4MZU6T5RVNE5VVMG3AUCGMLDHJ7ET X-MailFrom: git@grubix.eu X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: 0.42 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: A6820940414 X-Spam-Score: 0.42 X-Migadu-Scanner: scn0.migadu.com X-TUID: 6l8bir4oujzm Signed-off-by: Michael J Gruber --- 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