Skip to content

Commit 35a568b

Browse files
committed
chore: preview pr
1 parent 3477f45 commit 35a568b

File tree

679 files changed

+47030
-4473
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

679 files changed

+47030
-4473
lines changed

tests/unit/base/test_version.py

Lines changed: 46 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -811,10 +811,12 @@ async def test_fetch_with_response_info_async(self):
811811
),
812812
Request(url="https://api.twilio.com/2010-04-01/Accounts/AC123.json"),
813813
)
814-
payload, status_code, headers = (
815-
await self.client.api.v2010.fetch_with_response_info_async(
816-
method="GET", uri="/Accounts/AC123.json"
817-
)
814+
(
815+
payload,
816+
status_code,
817+
headers,
818+
) = await self.client.api.v2010.fetch_with_response_info_async(
819+
method="GET", uri="/Accounts/AC123.json"
818820
)
819821

820822
self.assertEqual(payload["sid"], "AC123")
@@ -836,12 +838,14 @@ async def test_update_with_response_info_async(self):
836838
url="https://api.twilio.com/2010-04-01/Accounts/AC123.json",
837839
),
838840
)
839-
payload, status_code, headers = (
840-
await self.client.api.v2010.update_with_response_info_async(
841-
method="POST",
842-
uri="/Accounts/AC123.json",
843-
data={"name": "Updated Account"},
844-
)
841+
(
842+
payload,
843+
status_code,
844+
headers,
845+
) = await self.client.api.v2010.update_with_response_info_async(
846+
method="POST",
847+
uri="/Accounts/AC123.json",
848+
data={"name": "Updated Account"},
845849
)
846850

847851
self.assertEqual(payload["sid"], "AC123")
@@ -858,10 +862,12 @@ async def test_delete_with_response_info_async(self):
858862
url="https://api.twilio.com/2010-04-01/Accounts/AC123/Messages/MM123.json",
859863
),
860864
)
861-
success, status_code, headers = (
862-
await self.client.api.v2010.delete_with_response_info_async(
863-
method="DELETE", uri="/Accounts/AC123/Messages/MM123.json"
864-
)
865+
(
866+
success,
867+
status_code,
868+
headers,
869+
) = await self.client.api.v2010.delete_with_response_info_async(
870+
method="DELETE", uri="/Accounts/AC123/Messages/MM123.json"
865871
)
866872

867873
self.assertTrue(success)
@@ -881,12 +887,14 @@ async def test_create_with_response_info_async(self):
881887
url="https://api.twilio.com/2010-04-01/Accounts/AC123/Messages.json",
882888
),
883889
)
884-
payload, status_code, headers = (
885-
await self.client.api.v2010.create_with_response_info_async(
886-
method="POST",
887-
uri="/Accounts/AC123/Messages.json",
888-
data={"body": "Hello World"},
889-
)
890+
(
891+
payload,
892+
status_code,
893+
headers,
894+
) = await self.client.api.v2010.create_with_response_info_async(
895+
method="POST",
896+
uri="/Accounts/AC123/Messages.json",
897+
data={"body": "Hello World"},
890898
)
891899

892900
self.assertEqual(payload["sid"], "MM123")
@@ -906,10 +914,12 @@ async def test_page_with_response_info_async(self):
906914
url="https://api.twilio.com/2010-04-01/Accounts/AC123/Messages.json"
907915
),
908916
)
909-
response, status_code, headers = (
910-
await self.client.api.v2010.page_with_response_info_async(
911-
method="GET", uri="/Accounts/AC123/Messages.json"
912-
)
917+
(
918+
response,
919+
status_code,
920+
headers,
921+
) = await self.client.api.v2010.page_with_response_info_async(
922+
method="GET", uri="/Accounts/AC123/Messages.json"
913923
)
914924

915925
self.assertIsNotNone(response)
@@ -989,10 +999,12 @@ async def test_fetch_with_response_info_async_empty_headers(self):
989999
Response(200, '{"sid": "AC123", "name": "Test Account"}', None),
9901000
Request(url="https://api.twilio.com/2010-04-01/Accounts/AC123.json"),
9911001
)
992-
payload, status_code, headers = (
993-
await self.client.api.v2010.fetch_with_response_info_async(
994-
method="GET", uri="/Accounts/AC123.json"
995-
)
1002+
(
1003+
payload,
1004+
status_code,
1005+
headers,
1006+
) = await self.client.api.v2010.fetch_with_response_info_async(
1007+
method="GET", uri="/Accounts/AC123.json"
9961008
)
9971009

9981010
self.assertEqual(payload["sid"], "AC123")
@@ -1014,10 +1026,12 @@ async def test_fetch_with_response_info_async_multiple_headers(self):
10141026
),
10151027
Request(url="https://api.twilio.com/2010-04-01/Accounts/AC123.json"),
10161028
)
1017-
payload, status_code, headers = (
1018-
await self.client.api.v2010.fetch_with_response_info_async(
1019-
method="GET", uri="/Accounts/AC123.json"
1020-
)
1029+
(
1030+
payload,
1031+
status_code,
1032+
headers,
1033+
) = await self.client.api.v2010.fetch_with_response_info_async(
1034+
method="GET", uri="/Accounts/AC123.json"
10211035
)
10221036

10231037
self.assertEqual(status_code, 200)

tests/unit/http/test_http_client.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,6 @@ def test_session_not_preserved(self):
296296

297297
class TestTwilioRequest(unittest.TestCase):
298298
def test_str(self):
299-
300299
req = Request(
301300
method="POST",
302301
url="https://api.twilio.com/2010-04-01/Accounts.json",

twilio/base/client_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ def request(
9090
headers = self.get_headers(method, headers)
9191

9292
if self.credential_provider:
93-
9493
auth_strategy = self.credential_provider.to_auth_strategy()
9594
headers["Authorization"] = auth_strategy.get_auth_string()
9695
elif self.username is not None and self.password is not None:

twilio/http/token_manager.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22

33

44
class TokenManager:
5-
65
def fetch_access_token(self, version: Version):
76
pass

twilio/rest/accounts/AccountsBase.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818

1919
class AccountsBase(Domain):
20-
2120
def __init__(self, twilio: Client):
2221
"""
2322
Initialize the Accounts Domain

twilio/rest/accounts/v1/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525

2626

2727
class V1(Version):
28-
2928
def __init__(self, domain: Domain):
3029
"""
3130
Initialize the V1 version of Accounts

twilio/rest/accounts/v1/auth_token_promotion.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Do not edit the class manually.
1313
"""
1414

15+
1516
from datetime import datetime
1617
from typing import Any, Dict, Optional
1718
from twilio.base import deserialize, values
@@ -23,6 +24,7 @@
2324

2425

2526
class AuthTokenPromotionInstance(InstanceResource):
27+
2628
"""
2729
:ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that the secondary Auth Token was created for.
2830
:ivar auth_token: The promoted Auth Token that must be used to authenticate future API requests.
@@ -107,7 +109,6 @@ def __repr__(self) -> str:
107109

108110

109111
class AuthTokenPromotionContext(InstanceContext):
110-
111112
def __init__(self, version: Version):
112113
"""
113114
Initialize the AuthTokenPromotionContext
@@ -205,7 +206,6 @@ def __repr__(self) -> str:
205206

206207

207208
class AuthTokenPromotionList(ListResource):
208-
209209
def __init__(self, version: Version):
210210
"""
211211
Initialize the AuthTokenPromotionList

twilio/rest/accounts/v1/bulk_consents.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Do not edit the class manually.
1313
"""
1414

15+
1516
from typing import Any, Dict, List, Optional
1617
from twilio.base import serialize, values
1718
from twilio.base.api_response import ApiResponse
@@ -22,6 +23,7 @@
2223

2324

2425
class BulkConsentsInstance(InstanceResource):
26+
2527
"""
2628
:ivar items: A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.
2729
"""
@@ -42,7 +44,6 @@ def __repr__(self) -> str:
4244

4345

4446
class BulkConsentsList(ListResource):
45-
4647
def __init__(self, version: Version):
4748
"""
4849
Initialize the BulkConsentsList

twilio/rest/accounts/v1/bulk_contacts.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Do not edit the class manually.
1313
"""
1414

15+
1516
from typing import Any, Dict, List, Optional
1617
from twilio.base import serialize, values
1718
from twilio.base.api_response import ApiResponse
@@ -22,6 +23,7 @@
2223

2324

2425
class BulkContactsInstance(InstanceResource):
26+
2527
"""
2628
:ivar items: A list of objects where each object represents the result of processing a `correlation_id`. Each object contains the following fields: `correlation_id`, a unique 32-character UUID that maps the response to the original request; `error_code`, an integer where 0 indicates success and any non-zero value represents an error; and `error_messages`, an array of strings describing specific validation errors encountered. If the request is successful, the error_messages array will be empty.
2729
"""
@@ -42,7 +44,6 @@ def __repr__(self) -> str:
4244

4345

4446
class BulkContactsList(ListResource):
45-
4647
def __init__(self, version: Version):
4748
"""
4849
Initialize the BulkContactsList

twilio/rest/accounts/v1/credential/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
Do not edit the class manually.
1313
"""
1414

15+
1516
from typing import Optional
1617

1718

@@ -23,7 +24,6 @@
2324

2425

2526
class CredentialList(ListResource):
26-
2727
def __init__(self, version: Version):
2828
"""
2929
Initialize the CredentialList

0 commit comments

Comments
 (0)