| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
| |
Add account configuration variable 'encrypt_to_self' that if true when
encrypting a message it will also be encrypted with the key defined for
this account.
Fixes #1140
|
|
|
|
|
|
|
|
|
|
|
| |
This uses a try/except because comparing an address to an empty string
should be a fairly uncommon event and try/except will be faster than
`if '@' not in other` in the case where '@' is in other.
This stops alot from crashing if there is no 'From' header in the
email. Outlook generates drafts without a 'From' header.
Fixes #1050
|
|\ |
|
| |
| |
| |
| |
| | |
This mostly shortens lines down to <=79 chars and fixes some other small
things I found using the pep8 tool.
|
| |
| |
| |
| |
| |
| |
| | |
This just wries the new Address class into alot for use, and fixes up a
few places where such fixups are needed.
Fixes #1107
|
| |
| |
| |
| |
| | |
This class will encapsulate the logic of comparing email addresses and
the rules of handling when capitalization is allowed and when it's not.
|
|/ |
|
|
|
|
|
|
| |
instead of assuming that it already receives a string. The new
behaviour is in sync with the type documented for the superclass
`Account`.
|
|
|
|
|
|
| |
Currently this code works because alot always populates aliases so it's
not None, but if for some reason it doesn't then get_addresses will
assert.
|
|\
| |
| | |
Use absolute_imports from __future__
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Completer class is abastract, and it's complete method is also
abstract. Using ABCMeta achieve two thing, first it will cause an error
if a developer doesn't overwrite the method in a subclass. And second
that it tells the static analysis tools to ignore the unused arguments
in the signature, since this is the definition of a signature, not an
actual function.
By the same logic addressbook.AddressBook, and account.Account have been
extended to use ABCMeta as their metaclass and have had their abstract
methods decorated with the abstract method attribute.
|
|
|
|
|
|
|
|
|
|
| |
This patch replaces a large number (but not all) unused arguments with
the standard ``_`` placeholder. This has the advantage of signaling that
these values are unused.
There are a number of places that I've chosen not to apply this, largely
in methods that have publicly define signatures that they inherit
(usually from urwid).
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are a number of cases of mutable keyword arguments (list and dict
in this case). Mutable keyword arguments are rather dangerous, since any
mutation of the default value is persistent, which will inevitably lead
to bugs.
For example, imagine this code:
def func(def=[]):
def.append('foo')
return def
>>> func()
['foo']
>>> func()
['foo', 'foo']
This is almost certainly not what was intended. This code generally uses
the idiom of setting the default value to None, and then assigning with
or `value = value or []` which will replace value with the empty list
(or dict) when value is falsey, like None or another empty list.
|
|
|
|
|
|
| |
- use relative imports if possible
- group imports into standard library, third party, and alot modules
- sort imports alphabetically
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
closes #589
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
be more error concious when storing mails to a maildir
and propagate Maildir errors to error notifications in the UI.
cf issue #502
|
| |
|
|
|
|
|
| |
This actually is a workaround for a Python bug as mentioned in
alot/crypto.py
|
|
|
|
| |
cf issue #472
|
|
|
|
|
|
|
|
| |
that splits a command string into a list of strings to pass on to subprocess.Popen and the like.
This helper is now used throughout the application instead of calling shlex.split directly as this
is a potential source for errors because shlex is not yet able to properly deal with unicode
bytestrings.
|
|
|
|
| |
existing gpg_key setting
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
sent_box and draft_box are already provided as Mailbox
objects so don't have to be interpreted/instanciated
here
|
|
|
|
|
|
|
|
|
|
| |
we use glob to find the path to a newly stored message file.
This makes us use glob.glob1 instead of glob.glob to make sure the mailbox path
is taken as is - and not interpreted as as regular expression, e.g. if it
contains square brackets.
This further ensures we don't access a possibly empty list out of index
closes #401
|
|
|
|
| |
closes #369
|
|
|
|
| |
a direct parser for abook's contact files.
|
|
|
|
|
|
|
|
|
| |
The default regexp now ignores a third field (only caring for the
first email and name). Tabs are not transformed to spaces before
matching is done. "goobook query" now works with the default regexp
like it should; both it and abook were made to output a mutt
query_command compatible format. Docs are updated accordingly. The
example for nottoomuch-addresses still works.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This has been introduced previously to enable Account.store_mail to index newly created
message files. This functionality has been moved to SendCommand and SaveCommand that use
FlushCommand to write out to the index (that deals with DatabaseErrors correctly).
|
|
|
|
|
|
|
| |
this is done using FlushCommand from the individual accounts:
FlushCommand will ensure that upon a locked index,
the changes will be caried out later. moreover,
this deals with Exceptions, the account doesn't.
|