mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Flake8 clean
This commit is contained in:
@@ -1 +1,2 @@
|
||||
from ._version import __version__, VERSION
|
||||
# Expose package version at root of package
|
||||
from ._version import __version__, VERSION # NOQA: F401
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -120,4 +120,3 @@ class SendGridTrackingWebhookView(SendGridBaseWebhookView):
|
||||
'url_offset', # click tracking
|
||||
'useragent', # click/open tracking
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys, os
|
||||
import os
|
||||
import sys
|
||||
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
|
||||
2
setup.py
2
setup.py
@@ -20,9 +20,11 @@ def long_description_from_readme(rst):
|
||||
release, rst) # (?<=...) is "positive lookbehind": must be there, but won't get replaced
|
||||
return rst
|
||||
|
||||
|
||||
with open('README.rst') as f:
|
||||
long_description = long_description_from_readme(f.read())
|
||||
|
||||
|
||||
setup(
|
||||
name="django-anymail",
|
||||
version=__version__,
|
||||
|
||||
@@ -315,4 +315,3 @@ class CatchCommonErrorsTests(TestBackendTestCase):
|
||||
self.message.reply_to = ugettext_lazy("single-reply-to@example.com")
|
||||
with self.assertRaisesMessage(TypeError, '"reply_to" attribute must be a list or other iterable'):
|
||||
self.message.send()
|
||||
|
||||
|
||||
@@ -526,4 +526,3 @@ class MailgunBackendDeprecationTests(MailgunBackendMockAPITestCase):
|
||||
with self.assertWarnsRegex(DeprecationWarning,
|
||||
r'anymail\.backends\.mailgun\.EmailBackend'):
|
||||
self.message.send()
|
||||
|
||||
|
||||
@@ -106,4 +106,3 @@ class PostmarkDeliveryTestCase(WebhookTestCase):
|
||||
self.assertEqual(event.message_id, "f4830d10-9c35-4f0c-bca3-3d9b459821f8")
|
||||
self.assertEqual(event.recipient, "recipient@example.com")
|
||||
self.assertEqual(event.user_agent, "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0")
|
||||
|
||||
|
||||
@@ -167,8 +167,7 @@ class _AssertWarnsContext(object):
|
||||
continue
|
||||
if first_matching is None:
|
||||
first_matching = w
|
||||
if (self.expected_regex is not None and
|
||||
not self.expected_regex.search(str(w))):
|
||||
if self.expected_regex is not None and not self.expected_regex.search(str(w)):
|
||||
continue
|
||||
# store warning for later retrieval
|
||||
self.warning = w
|
||||
|
||||
Reference in New Issue
Block a user