[PATCH] python: make some docstrings raw

Jakub Wilk jwilk at jwilk.net
Wed Nov 20 02:46:39 PST 2019


Fixes:

    notmuch/message.py:57: DeprecationWarning: invalid escape sequence \s
    notmuch/query.py:155: DeprecationWarning: invalid escape sequence \.
    notmuch/messages.py:89: DeprecationWarning: invalid escape sequence \s

with Python >= 3.6.
---
 bindings/python/notmuch/message.py  | 2 +-
 bindings/python/notmuch/messages.py | 2 +-
 bindings/python/notmuch/query.py    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py
index 6e32b5f7..e71dbe3e 100644
--- a/bindings/python/notmuch/message.py
+++ b/bindings/python/notmuch/message.py
@@ -46,7 +46,7 @@ import sys
 
 
 class Message(Python3StringMixIn):
-    """Represents a single Email message
+    r"""Represents a single Email message
 
     Technically, this wraps the underlying *notmuch_message_t*
     structure. A user will usually not create these objects themselves
diff --git a/bindings/python/notmuch/messages.py b/bindings/python/notmuch/messages.py
index cae5da50..3801c666 100644
--- a/bindings/python/notmuch/messages.py
+++ b/bindings/python/notmuch/messages.py
@@ -32,7 +32,7 @@ from .tag import Tags
 from .message import Message
 
 class Messages(object):
-    """Represents a list of notmuch messages
+    r"""Represents a list of notmuch messages
 
     This object provides an iterator over a list of notmuch messages
     (Technically, it provides a wrapper for the underlying
diff --git a/bindings/python/notmuch/query.py b/bindings/python/notmuch/query.py
index cc70e2aa..bdc18790 100644
--- a/bindings/python/notmuch/query.py
+++ b/bindings/python/notmuch/query.py
@@ -140,7 +140,7 @@ class Query(object):
     _search_threads.restype = c_uint
 
     def search_threads(self):
-        """Execute a query for threads
+        r"""Execute a query for threads
 
         Execute a query for threads, returning a :class:`Threads` iterator.
         The returned threads are owned by the query and as such, will only be
-- 
2.24.0



More information about the notmuch mailing list