diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2016-12-14 10:49:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-12-14 10:49:54 -0800 |
commit | fdb2d7103877185b6865e872cb06e7bdd237f9dc (patch) | |
tree | 24aee06dc0c7f46400291575f888e588fa48f0c0 | |
parent | 24a51c4e49f139b5e12eb369e829dd1c5646aba7 (diff) | |
parent | f0fb96fd02a222c747e60ce7b82a08f7fa0c18a0 (diff) |
Merge pull request #920 from lucc/pylint
Small fixes found with pylint
-rw-r--r-- | alot/commands/globals.py | 15 | ||||
-rw-r--r-- | alot/commands/thread.py | 5 | ||||
-rw-r--r-- | alot/errors.py | 2 | ||||
-rw-r--r-- | alot/ui.py | 1 |
4 files changed, 10 insertions, 13 deletions
diff --git a/alot/commands/globals.py b/alot/commands/globals.py index af9eb7f9..7d5c1d3e 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -851,19 +851,18 @@ class ComposeCommand(Command): # set encryption if needed if self.encrypt or account.encrypt_by_default == u"all": - logging.debug("Trying to encrypt message because encrypt={} and " - "encrypt_by_default={}".format( - self.encrypt, account.encrypt_by_default)) + logging.debug("Trying to encrypt message because encrypt=%s and " + "encrypt_by_default=%s", self.encrypt, + account.encrypt_by_default) yield self._set_encrypt(ui, self.envelope) elif account.encrypt_by_default == u"trusted": logging.debug("Trying to encrypt message because " - "account.encrypt_by_default={}".format( - account.encrypt_by_default)) + "account.encrypt_by_default=%s", + account.encrypt_by_default) yield self._set_encrypt(ui, self.envelope, trusted_only=True) else: - logging.debug( - "No encryption by default, encrypt_by_default={}".format( - account.encrypt_by_default)) + logging.debug("No encryption by default, encrypt_by_default=%s", + account.encrypt_by_default) cmd = commands.envelope.EditCommand(envelope=self.envelope, spawn=self.force_spawn, diff --git a/alot/commands/thread.py b/alot/commands/thread.py index ad7110ed..00ac3f45 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -8,7 +8,7 @@ import os import re import subprocess import tempfile -from email.Utils import getaddresses, parseaddr +from email.utils import getaddresses, parseaddr from email.message import Message from twisted.internet.defer import inlineCallbacks @@ -82,8 +82,7 @@ def determine_sender(mail, action='reply'): regex = re.compile('^' + alias + '$', flags=re.IGNORECASE) for seen_name, seen_address in candidate_addresses: if regex.match(seen_address): - logging.debug("match!: '%s' '%s'" % (seen_address, - alias)) + logging.debug("match!: '%s' '%s'", seen_address, alias) if settings.get(action + '_force_realname'): realname = account.realname else: diff --git a/alot/errors.py b/alot/errors.py index e3acba8b..9860f411 100644 --- a/alot/errors.py +++ b/alot/errors.py @@ -3,7 +3,7 @@ # For further details see the COPYING file -class GPGCode: +class GPGCode(object): AMBIGUOUS_NAME = 1 NOT_FOUND = 2 BAD_PASSPHRASE = 3 @@ -368,7 +368,6 @@ class UI(object): buf.cleanup() success = True else: - string = 'closing buffer %d:%s' buffers.remove(buf) buf.cleanup() success = True |