Skip to content

Commit 11279cf

Browse files
committed
fix styling
1 parent 1dc851d commit 11279cf

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

sparkpost/transmissions.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ def _parse_address(self, address):
140140

141141
def _extract_recipients(self, recipients):
142142

143-
if not (isinstance(recipients, types.ListType) or isinstance(recipients, types.DictType)):
143+
if not (
144+
isinstance(recipients, types.ListType) or
145+
isinstance(recipients, types.DictType)
146+
):
144147
raise SparkPostException('recipients must be a list or dict')
145148

146149
formatted_recipients = []

test/test_transmissions.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,18 @@ def test_translate_keys_with_recips():
2828
{'key': 'value'},
2929
{'address': {'email': 'foobar'}}]
3030

31-
results = t._translate_keys(recipients=[{'address': {'name': 'foo', 'email': 'bar'}}])
32-
assert results['recipients'] == [{'address': {'name': 'foo', 'email': 'bar'}}]
31+
results = t._translate_keys(
32+
recipients=[{'address': {'name': 'foo', 'email': 'bar'}}]
33+
)
34+
assert results['recipients'] == [
35+
{'address': {'name': 'foo', 'email': 'bar'}}
36+
]
37+
3338

3439
def test_exceptions_for_recipients():
3540
t = Transmissions('uri', 'key')
3641
with pytest.raises(SparkPostException):
37-
results = t._translate_keys(recipients='test')
42+
t._translate_keys(recipients='test')
3843

3944

4045
def test_translate_keys_with_unicode_recips():

0 commit comments

Comments
 (0)