8000 PEP8 · codemunkee/twilio-python@5325dcf · GitHub
[go: up one dir, main page]

Skip to content

Commit 5325dcf

Browse files
committed
PEP8
1 parent 20966ba commit 5325dcf

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

tests/test_addresses.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,26 @@ def test_update_rejects_iso_country(self):
2727
self.resource.update("123", iso_country="CA")
2828

2929
def test_dependent_phone_numbers(self):
30-
pn_list = DependentPhoneNumbers('http://api.twilio.com/mock', ('user', 'pass'))
30+
pn_list = DependentPhoneNumbers(
31+
'http://api.twilio.com/mock',
32+
('user', 'pass'),
33+
)
3134
request = Mock()
32-
request.return_value = (Mock(), {"dependent_phone_numbers": [{"sid": "PN123"}], "total": 1, "page": 0, "page_size": 50})
35+
request.return_value = (
36+
Mock(),
37+
{
38+
"dependent_phone_numbers": [{"sid": "PN123"}],
39+
"total": 1,
40+
"page": 0,
41+
"page_s 8000 ize": 50,
42+
},
43+
)
3344
pn_list.request = request
3445

3546
result = pn_list.list()
36-
request.assert_called_with("GET", "http://api.twilio.com/mock/DependentPhoneNumbers", params={})
47+
request.assert_called_with(
48+
"GET",
49+
"http://api.twilio.com/mock/DependentPhoneNumbers",
50+
params={},
51+
)
3752
assert_equal(result[0].sid, 'PN123')

twilio/rest/resources/addresses.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,11 @@ def create(self, customer_name, street, city, region, postal_code,
100100
:param str street: The number and street of your address
101101
:param str city: The city of you or your customer's address
102102
:param str region: The region or state
103-
:param str postal_code: The postal code of you or your customer's address
104-
:param str iso_country: The ISO 3166-1 alpha-2 (two-character) country code, e.g. 'US' or 'AU'
105-
:param str friendly_name: A user-defined name for this address (optional; up to 64 characters)
103+
:param str postal_code: The postal code of your address
104+
:param str iso_country: The ISO 3166-1 alpha-2 (two-character)
105+
country code, e.g. 'US' or 'AU'
106+
:param str friendly_name: A user-defined name for this address
107+
(optional; up to 64 characters)
106108
"""
107109
kwargs = {
108110
'customer_name': customer_name,
@@ -126,7 +128,9 @@ def update(self, sid, **kwargs):
126128
an existing Address (create a new one instead).
127129
"""
128130
if 'iso_country' in kwargs:
129-
raise TwilioException("Cannot update iso_country on an existing Address")
131+
raise TwilioException(
132+
"Cannot update iso_country on an existing Address",
133+
)
130134

131135
return self.update_instance(sid, kwargs)
132136

0 commit comments

Comments
 (0)
0