Skip to content
This repository has been archived by the owner on Nov 5, 2022. It is now read-only.

Commit

Permalink
Fix python lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
albertyw committed Jan 26, 2020
1 parent bf3cca3 commit 7c88885
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mailgun2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
__license__ = 'Apache 2.0'

try:
from .mailgun import Mailgun
except:
from .mailgun import Mailgun # noqa: F401
except ImportError:
pass
7 changes: 6 additions & 1 deletion mailgun2/mailgun.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,9 @@ def verify_authenticity(self, token, timestamp, signature):
def validate(self, address):
params = {'address': address}
auth = ('api', self.public_key)
return self.get('/address/validate', params=params, auth=auth, include_domain=False)
return self.get(
'/address/validate',
params=params,
auth=auth,
include_domain=False,
)
8 changes: 6 additions & 2 deletions tests/mailgun.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import unittest

from mock import patch, MagicMock
from mock import patch

import mailgun2

Expand All @@ -12,7 +12,11 @@ def setUp(self):
self.public_key = 'test_public_key'
self.private_key = 'test_private_key'
self.domain = 'test.domain'
self.mailgun = mailgun2.Mailgun(self.domain, self.public_key, self.private_key)
self.mailgun = mailgun2.Mailgun(
self.domain,
self.public_key,
self.private_key,
)
self.post_patcher = patch('mailgun2.mailgun.requests.post')
self.mock_post = self.post_patcher.start()

Expand Down

0 comments on commit 7c88885

Please sign in to comment.