]> git.notmuchmail.org Git - notmuch/commitdiff
bindings/python-cffi: fix typos master
authorJakub Wilk <jwilk@jwilk.net>
Wed, 19 Mar 2025 19:28:31 +0000 (20:28 +0100)
committerDavid Bremner <david@tethera.net>
Mon, 16 Jun 2025 11:05:37 +0000 (08:05 -0300)
bindings/python-cffi/notmuch2/__init__.py
bindings/python-cffi/notmuch2/_base.py
bindings/python-cffi/notmuch2/_config.py
bindings/python-cffi/notmuch2/_database.py
bindings/python-cffi/notmuch2/_message.py
bindings/python-cffi/notmuch2/_tags.py

index b1cd21c1f7aa9e4778b2697c6d3b732f521957f2..978e01c2a5e327eec4ce79a2e30fc9042767087c 100644 (file)
@@ -22,7 +22,7 @@ Libnotmuch uses a hierarchical memory allocator, this means all
 objects have a strict parent-child relationship and when the parent is
 freed all the children are freed as well.  This has some implications
 for these Python bindings as parent objects need to be kept alive.
 objects have a strict parent-child relationship and when the parent is
 freed all the children are freed as well.  This has some implications
 for these Python bindings as parent objects need to be kept alive.
-This is normally schielded entirely from the user however and the
+This is normally shielded entirely from the user however and the
 Python objects automatically make sure the right references are kept
 alive.  It is however the reason the :class:`BaseObject` exists as it
 defines the API all Python objects need to implement to work
 Python objects automatically make sure the right references are kept
 alive.  It is however the reason the :class:`BaseObject` exists as it
 defines the API all Python objects need to implement to work
index c83abd013c420b25f9c92cdee5043880675969d0..1b0b5b7e1e1f0d0e350e97ee6e9cbed0a1595494 100644 (file)
@@ -28,7 +28,7 @@ class NotmuchObject(metaclass=abc.ABCMeta):
 
     However during some peculiar situations, e.g. interpreter
     shutdown, it is possible for the :meth:`__del__` method to have
 
     However during some peculiar situations, e.g. interpreter
     shutdown, it is possible for the :meth:`__del__` method to have
-    been called, whele there are still references to an object.  This
+    been called, while there are still references to an object.  This
     could result in child objects asking their memory to be freed
     after the parent has already freed the memory, making things
     rather unhappy as double frees are not taken lightly in C.  To
     could result in child objects asking their memory to be freed
     after the parent has already freed the memory, making things
     rather unhappy as double frees are not taken lightly in C.  To
@@ -174,7 +174,7 @@ class NotmuchIter(NotmuchObject, collections.abc.Iterator):
     :type parent: NotmuchObject
     :param iter_p: The CFFI pointer to the C iterator.
     :type iter_p: cffi.cdata
     :type parent: NotmuchObject
     :param iter_p: The CFFI pointer to the C iterator.
     :type iter_p: cffi.cdata
-    :param fn_destory: The CFFI notmuch_*_destroy function.
+    :param fn_destroy: The CFFI notmuch_*_destroy function.
     :param fn_valid: The CFFI notmuch_*_valid function.
     :param fn_get: The CFFI notmuch_*_get function.
     :param fn_next: The CFFI notmuch_*_move_to_next function.
     :param fn_valid: The CFFI notmuch_*_valid function.
     :param fn_get: The CFFI notmuch_*_get function.
     :param fn_next: The CFFI notmuch_*_move_to_next function.
index 603fdcbf02c6b544e6224085df20f96c51ef00ee..4df03bd0841387aeb0499d006578997a79d4c75b 100644 (file)
@@ -35,7 +35,7 @@ class ConfigIter(base.NotmuchIter):
 
 class ConfigMapping(base.NotmuchObject, collections.abc.MutableMapping):
     """The config key/value pairs loaded from the database, config file,
 
 class ConfigMapping(base.NotmuchObject, collections.abc.MutableMapping):
     """The config key/value pairs loaded from the database, config file,
-    and and/or defaults.
+    and/or defaults.
 
     The entries are exposed as a :class:`collections.abc.MutableMapping` object.
     Note that setting a value to an empty string is the same as deleting it.
 
     The entries are exposed as a :class:`collections.abc.MutableMapping` object.
     Note that setting a value to an empty string is the same as deleting it.
index d2671fdfaeac69604101919d22dee6d2ca7ebdf4..f1451bf180ba9e549a6ba045dbbcb7c1e817cb40 100644 (file)
@@ -351,7 +351,7 @@ class Database(base.NotmuchObject):
         The returned context manager can be used to perform atomic
         operations on the database.
 
         The returned context manager can be used to perform atomic
         operations on the database.
 
-        .. note:: Unlinke a traditional RDBMS transaction this does
+        .. note:: Unlike a traditional RDBMS transaction this does
            not imply durability, it only ensures the changes are
            performed atomically.
 
            not imply durability, it only ensures the changes are
            performed atomically.
 
@@ -416,7 +416,7 @@ class Database(base.NotmuchObject):
         :raises XapianError: A Xapian exception occurred.
         :raises FileError: The file referred to by ``pathname`` could
            not be opened.
         :raises XapianError: A Xapian exception occurred.
         :raises FileError: The file referred to by ``pathname`` could
            not be opened.
-        :raises FileNotEmailError: The file referreed to by
+        :raises FileNotEmailError: The file referred to by
            ``pathname`` is not recognised as an email message.
         :raises ReadOnlyDatabaseError: The database is opened in
            READ_ONLY mode.
            ``pathname`` is not recognised as an email message.
         :raises ReadOnlyDatabaseError: The database is opened in
            READ_ONLY mode.
index 7bd2033121bfd4701af9066d041459735bd7754d..794852389fe70262e9502fe735733db41725fc6c 100644 (file)
@@ -344,7 +344,7 @@ class Message(base.NotmuchObject):
 
         Instead the map has an additional :meth:`PropertiesMap.getall`
         method which can be used to retrieve all properties of a given
 
         Instead the map has an additional :meth:`PropertiesMap.getall`
         method which can be used to retrieve all properties of a given
-        key.  This method also allows iterating of a subset of the
+        key.  This method also allows iterating of a subset of the
         keys starting with a given prefix.
         """
         try:
         keys starting with a given prefix.
         """
         try:
@@ -428,7 +428,7 @@ class PropertiesMap(base.NotmuchObject, collections.abc.MutableMapping):
     """A mutable mapping to manage properties.
 
     Both keys and values of properties are supposed to be UTF-8
     """A mutable mapping to manage properties.
 
     Both keys and values of properties are supposed to be UTF-8
-    strings in libnotmuch.  However since the uderlying API uses
+    strings in libnotmuch.  However since the underlying API uses
     bytestrings you can use either str or bytes to represent keys and
     all returned keys and values use :class:`BinString`.
 
     bytestrings you can use either str or bytes to represent keys and
     all returned keys and values use :class:`BinString`.
 
@@ -486,7 +486,7 @@ class PropertiesMap(base.NotmuchObject, collections.abc.MutableMapping):
         return len(list(it))
 
     def __getitem__(self, key):
         return len(list(it))
 
     def __getitem__(self, key):
-        """Return **the first** peroperty associated with a key."""
+        """Return **the first** property associated with a key."""
         if isinstance(key, str):
             key = key.encode('utf-8')
         value_pp = capi.ffi.new('char**')
         if isinstance(key, str):
             key = key.encode('utf-8')
         value_pp = capi.ffi.new('char**')
@@ -509,7 +509,7 @@ class PropertiesMap(base.NotmuchObject, collections.abc.MutableMapping):
         """Return a :class:`collections.abc.ItemsView` for this map.
 
         The ItemsView treats a ``(key, value)`` pair as unique, so
         """Return a :class:`collections.abc.ItemsView` for this map.
 
         The ItemsView treats a ``(key, value)`` pair as unique, so
-        dupcliate ``(key, value)`` pairs will be merged together.
+        duplicate ``(key, value)`` pairs will be merged together.
         However duplicate keys with different values will be returned.
         """
         items = set()
         However duplicate keys with different values will be returned.
         """
         items = set()
@@ -524,7 +524,7 @@ class PropertiesMap(base.NotmuchObject, collections.abc.MutableMapping):
         return PropertiesItemsView(items)
 
     def values(self):
         return PropertiesItemsView(items)
 
     def values(self):
-        """Return a :class:`collecions.abc.ValuesView` for this map.
+        """Return a :class:`collections.abc.ValuesView` for this map.
 
         All unique property values are included in the view.
         """
 
         All unique property values are included in the view.
         """
index ee5d2a34b2c210540b131539c3b0d159ee942a82..28528831530b96c641ff78ed3128df6e65cf5815 100644 (file)
@@ -69,7 +69,7 @@ class ImmutableTagSet(base.NotmuchObject, collections.abc.Set):
         return self.iter(encoding='utf-8', errors='ignore')
 
     def iter(self, *, encoding=None, errors='strict'):
         return self.iter(encoding='utf-8', errors='ignore')
 
     def iter(self, *, encoding=None, errors='strict'):
-        """Aternate iterator constructor controlling string decoding.
+        """Alternate iterator constructor controlling string decoding.
 
         Tags are stored as bytes in the notmuch database, in Python
         it's easier to work with unicode strings and thus is what the
 
         Tags are stored as bytes in the notmuch database, in Python
         it's easier to work with unicode strings and thus is what the
@@ -87,7 +87,7 @@ class ImmutableTagSet(base.NotmuchObject, collections.abc.Set):
         """
         # self._cffi_fn should point either to
         # notmuch_database_get_all_tags, notmuch_thread_get_tags or
         """
         # self._cffi_fn should point either to
         # notmuch_database_get_all_tags, notmuch_thread_get_tags or
-        # notmuch_message_get_tags.  nothmuch.h suggests these never
+        # notmuch_message_get_tags.  notmuch.h suggests these never
         # fail, let's handle NULL anyway.
         tags_p = self._cffi_fn(self._ptr())
         if tags_p == capi.ffi.NULL:
         # fail, let's handle NULL anyway.
         tags_p = self._cffi_fn(self._ptr())
         if tags_p == capi.ffi.NULL:
@@ -155,7 +155,7 @@ class MutableTagSet(ImmutableTagSet, collections.abc.MutableSet):
     Tags are bytestrings and calling ``iter()`` will return an
     iterator yielding bytestrings.  However the :meth:`iter` method
     can be used to return tags as unicode strings, while all other
     Tags are bytestrings and calling ``iter()`` will return an
     iterator yielding bytestrings.  However the :meth:`iter` method
     can be used to return tags as unicode strings, while all other
-    operations accept either byestrings or unicode strings.  In case
+    operations accept either bytestrings or unicode strings.  In case
     unicode strings are used they will be encoded using utf-8 before
     being passed to notmuch.
     """
     unicode strings are used they will be encoded using utf-8 before
     being passed to notmuch.
     """