mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-21 12:21:06 -05:00
Flake8 clean
This commit is contained in:
@@ -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__.)
|
||||
"""
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -344,4 +344,3 @@ class SendGridPayload(RequestsPayload):
|
||||
"or use 'anymail.backends.sendgrid_v2.EmailBackend' for the old API."
|
||||
)
|
||||
update_deep(self.data, extra)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user