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

2
.flake8 Normal file
View File

@@ -0,0 +1,2 @@
[flake8]
max-line-length = 120

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

@@ -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
}

View File

@@ -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,

View File

@@ -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__,

View File

@@ -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()

View File

@@ -526,4 +526,3 @@ class MailgunBackendDeprecationTests(MailgunBackendMockAPITestCase):
with self.assertWarnsRegex(DeprecationWarning,
r'anymail\.backends\.mailgun\.EmailBackend'):
self.message.send()

View File

@@ -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")

View File

@@ -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