Flake8 clean

This commit is contained in:
medmunds
2017-04-16 11:43:13 -07:00
parent 853a7cd31d
commit 8bdc67939a
15 changed files with 58 additions and 57 deletions

View File

@@ -1 +1,2 @@
from ._version import __version__, VERSION
# Expose package version at root of package
from ._version import __version__, VERSION # NOQA: F401

View File

@@ -282,7 +282,7 @@ class BasePayload(object):
def validate_not_bare_string(self, attr, value):
"""EmailMessage to, cc, bcc, and reply_to are specced to be lists of strings.
This catches the common error where a single string is used instead.
(See also checks in EmailMessage.__init__.)
"""

View File

@@ -214,7 +214,7 @@ class MandrillPayload(RequestsPayload):
{'rcpt': rcpt, 'values': recipient_metadata[rcpt]}
for rcpt in sorted(recipient_metadata.keys())]
# Merge esp_extra with payload data: shallow merge within ['message'] and top-level keys
self.data.update({k:v for k,v in esp_extra.items() if k != 'message'})
self.data.update({k: v for k, v in esp_extra.items() if k != 'message'})
try:
self.data['message'].update(esp_extra['message'])
except KeyError:
@@ -311,4 +311,5 @@ class MandrillPayload(RequestsPayload):
setter.__name__ = setter_name
return setter
MandrillPayload.define_message_attr_setters()

View File

@@ -344,4 +344,3 @@ class SendGridPayload(RequestsPayload):
"or use 'anymail.backends.sendgrid_v2.EmailBackend' for the old API."
)
update_deep(self.data, extra)

View File

@@ -120,4 +120,3 @@ class SendGridTrackingWebhookView(SendGridBaseWebhookView):
'url_offset', # click tracking
'useragent', # click/open tracking
}