X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fpython-cffi%2Fnotmuch2%2F_database.py;h=c1fb88eb35c2e956fb7356559bc3041d8772a524;hb=4b361f4d35df92bb2c679143adedf4b88288648c;hp=7db5a7f85b224505523fbd1dbdbdcb797bd341d5;hpb=776a54a0e437651abd69a03b9f7d591ea1f992cb;p=notmuch diff --git a/bindings/python-cffi/notmuch2/_database.py b/bindings/python-cffi/notmuch2/_database.py index 7db5a7f8..c1fb88eb 100644 --- a/bindings/python-cffi/notmuch2/_database.py +++ b/bindings/python-cffi/notmuch2/_database.py @@ -187,8 +187,8 @@ class Database(base.NotmuchObject): :param cfg_path: The pathname of the notmuch configuration file. If not specified tries to use the pathname provided in the - :env:`NOTMUCH_CONFIG` environment variable and falls back - to :file:`~/.notmuch-config. + :envvar:`NOTMUCH_CONFIG` environment variable and falls back + to :file:`~/.notmuch-config`. :type cfg_path: str, bytes, os.PathLike or pathlib.Path. :returns: The path of the database, which does not necessarily @@ -198,7 +198,7 @@ class Database(base.NotmuchObject): be opened. :raises configparser.Error: or subclasses if the configuration file can not be parsed. - :raises NotmuchError if the config file does not have the + :raises NotmuchError: if the config file does not have the database.path setting. """ if not cfg_path: @@ -422,7 +422,7 @@ class Database(base.NotmuchObject): of it as ``dup = db.remove_message(name); if dup: ...``. :rtype: bool - :raises XapianError: A Xapian exception ocurred. + :raises XapianError: A Xapian exception occurred. :raises ReadOnlyDatabaseError: The database is opened in READ_ONLY mode. :raises UpgradeRequiredError: The database must be upgraded @@ -458,7 +458,7 @@ class Database(base.NotmuchObject): :raises LookupError: If no message was found. :raises OutOfMemoryError: When there is no memory to allocate the message instance. - :raises XapianError: A Xapian exception ocurred. + :raises XapianError: A Xapian exception occurred. :raises ObjectDestroyedError: if used after destroyed. """ msg_pp = capi.ffi.new('notmuch_message_t **') @@ -489,7 +489,7 @@ class Database(base.NotmuchObject): a subclass of :exc:`KeyError`. :raises OutOfMemoryError: When there is no memory to allocate the message instance. - :raises XapianError: A Xapian exception ocurred. + :raises XapianError: A Xapian exception occurred. :raises ObjectDestroyedError: if used after destroyed. """ if not hasattr(os, 'PathLike') and isinstance(filename, pathlib.Path): @@ -578,7 +578,7 @@ class Database(base.NotmuchObject): if exclude_tags is not None: for tag in exclude_tags: if isinstance(tag, str): - tag = str.encode('utf-8') + tag = tag.encode('utf-8') capi.lib.notmuch_query_add_tag_exclude(query_p, tag) return querymod.Query(self, query_p) @@ -695,7 +695,7 @@ class AtomicContext: """Force ending the atomic section. This can only be called once __exit__ has been called. It - will attept to close the atomic section (again). This is + will attempt to close the atomic section (again). This is useful if the original exit raised an exception and the atomic section is still open. But things are pretty ugly by now.