summaryrefslogtreecommitdiff
path: root/alot/account.py
diff options
context:
space:
mode:
authorPatrick Totzke <patricktotzke@gmail.com>2017-08-31 15:19:15 +0100
committerPatrick Totzke <patricktotzke@gmail.com>2017-09-01 15:33:15 +0100
commit134d791f94dec9bf06b98a9881495a435c191bd3 (patch)
tree598cb50b34a1e8346c114dbf50c0a013cb3d5f48 /alot/account.py
parent0df1c905aee10308069d9db9e396714feabc4ce4 (diff)
pep8 fixes
This mostly shortens lines down to <=79 chars and fixes some other small things I found using the pep8 tool.
Diffstat (limited to 'alot/account.py')
-rw-r--r--alot/account.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/alot/account.py b/alot/account.py
index e561f0c9..ca3fc375 100644
--- a/alot/account.py
+++ b/alot/account.py
@@ -73,8 +73,8 @@ class Address(object):
"""
def __init__(self, user, domain, case_sensitive=False):
- assert isinstance(user, unicode), 'Username must be unicode not bytes'
- assert isinstance(domain, unicode), 'Domain name must be unicode not bytes'
+ assert isinstance(user, unicode), 'Username must be unicode'
+ assert isinstance(domain, unicode), 'Domain name must be unicode'
self.username = user
self.domainname = domain
self.case_sensitive = case_sensitive
@@ -89,7 +89,7 @@ class Address(object):
:returns: An account from the given arguments
:rtype: :class:`Account`
"""
- assert isinstance(address, unicode), 'address must be unicode not bytes'
+ assert isinstance(address, unicode), 'address must be unicode'
username, domainname = address.split(u'@')
return cls(username, domainname, case_sensitive=case_sensitive)
@@ -140,12 +140,12 @@ class Address(object):
def __eq__(self, other):
if not isinstance(other, (Address, basestring)):
- raise TypeError('Cannot compare Address to any but Address or basestring')
+ raise TypeError('Address must be compared to Address or basestring')
return self.__cmp(other, operator.eq)
def __ne__(self, other):
if not isinstance(other, (Address, basestring)):
- raise TypeError('Cannot compare Address to any but Address or basestring')
+ raise TypeError('Address must be compared to Address or basestring')
# != is the only rich comparitor that cannot be implemented using 'and'
# in self.__cmp, so it's implemented as not ==.
return not self.__cmp(other, operator.eq)