Skip to content

Commit daecc55

Browse files
author
childish-sambino
authored
chore: allow 'None' for non-parent params (#680)
Fixes pyright errors.
1 parent e36364e commit daecc55

File tree

327 files changed

+1065
-328
lines changed

Some content is hidden

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

327 files changed

+1065
-328
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ nopyc:
5757
find . -name \*.pyc -delete
5858

5959
prettier:
60-
. venv/bin/activate; black .
6160
. venv/bin/activate; autoflake --remove-all-unused-imports -i -r --exclude venv .
61+
. venv/bin/activate; black .
6262

6363
prettier-check:
64-
. venv/bin/activate; black --check .
6564
. venv/bin/activate; autoflake --check-diff --quiet --remove-all-unused-imports -r --exclude venv .
65+
. venv/bin/activate; black --check .
6666

6767
API_DEFINITIONS_SHA=$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5)
6868
CURRENT_TAG=$(shell expr "${GITHUB_TAG}" : ".*-rc.*" >/dev/null && echo "rc" || echo "latest")

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515

16+
from typing import Optional
1617
from twilio.base import deserialize
1718
from twilio.base import values
1819
from twilio.base.instance_context import InstanceContext
@@ -332,7 +333,7 @@ def __repr__(self):
332333

333334

334335
class AwsInstance(InstanceResource):
335-
def __init__(self, version, payload, sid: str = None):
336+
def __init__(self, version, payload, sid: Optional[str] = None):
336337
"""
337338
Initialize the AwsInstance
338339

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515

16+
from typing import Optional
1617
from twilio.base import deserialize
1718
from twilio.base import values
1819
from twilio.base.instance_context import InstanceContext
@@ -332,7 +333,7 @@ def __repr__(self):
332333

333334

334335
class PublicKeyInstance(InstanceResource):
335-
def __init__(self, version, payload, sid: str = None):
336+
def __init__(self, version, payload, sid: Optional[str] = None):
336337
"""
337338
Initialize the PublicKeyInstance
338339

twilio/rest/api/v2010/account/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515

16+
from typing import Optional
1617
from twilio.base import deserialize
1718
from twilio.base import values
1819
from twilio.base.instance_context import InstanceContext
@@ -417,7 +418,7 @@ class Type(object):
417418
TRIAL = "Trial"
418419
FULL = "Full"
419420

420-
def __init__(self, version, payload, sid: str = None):
421+
def __init__(self, version, payload, sid: Optional[str] = None):
421422
"""
422423
Initialize the AccountInstance
423424

twilio/rest/api/v2010/account/address/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515

16+
from typing import Optional
1617
from twilio.base import deserialize
1718
from twilio.base import values
1819
from twilio.base.instance_context import InstanceContext
@@ -478,7 +479,7 @@ def __repr__(self):
478479

479480

480481
class AddressInstance(InstanceResource):
481-
def __init__(self, version, payload, account_sid: str, sid: str = None):
482+
def __init__(self, version, payload, account_sid: str, sid: Optional[str] = None):
482483
"""
483484
Initialize the AddressInstance
484485

twilio/rest/api/v2010/account/application.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515

16+
from typing import Optional
1617
from twilio.base import deserialize
1718
from twilio.base import values
1819
from twilio.base.instance_context import InstanceContext
@@ -453,7 +454,7 @@ def __repr__(self):
453454

454455

455456
class ApplicationInstance(InstanceResource):
456-
def __init__(self, version, payload, account_sid: str, sid: str = None):
457+
def __init__(self, version, payload, account_sid: str, sid: Optional[str] = None):
457458
"""
458459
Initialize the ApplicationInstance
459460

twilio/rest/api/v2010/account/authorized_connect_app.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515

16+
from typing import Optional
1617
from twilio.base import deserialize
1718
from twilio.base import values
1819
from twilio.base.instance_context import InstanceContext
@@ -295,7 +296,9 @@ class Permission(object):
295296
GET_ALL = "get-all"
296297
POST_ALL = "post-all"
297298

298-
def __init__(self, version, payload, account_sid: str, connect_app_sid: str = None):
299+
def __init__(
300+
self, version, payload, account_sid: str, connect_app_sid: Optional[str] = None
301+
):
299302
"""
300303
Initialize the AuthorizedConnectAppInstance
301304

twilio/rest/api/v2010/account/available_phone_number_country/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515

16+
from typing import Optional
1617
from twilio.base import values
1718
from twilio.base.instance_context import InstanceContext
1819
from twilio.base.instance_resource import InstanceResource
@@ -307,7 +308,9 @@ def __repr__(self):
307308

308309

309310
class AvailablePhoneNumberCountryInstance(InstanceResource):
310-
def __init__(self, version, payload, account_sid: str, country_code: str = None):
311+
def __init__(
312+
self, version, payload, account_sid: str, country_code: Optional[str] = None
313+
):
311314
"""
312315
Initialize the AvailablePhoneNumberCountryInstance
313316

twilio/rest/api/v2010/account/call/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515

16+
from typing import Optional
1617
from twilio.base import deserialize
1718
from twilio.base import serialize
1819
from twilio.base import values
@@ -800,7 +801,7 @@ class Status(object):
800801
NO_ANSWER = "no-answer"
801802
CANCELED = "canceled"
802803

803-
def __init__(self, version, payload, account_sid: str, sid: str = None):
804+
def __init__(self, version, payload, account_sid: str, sid: Optional[str] = None):
804805
"""
805806
Initialize the CallInstance
806807

twilio/rest/api/v2010/account/call/feedback_summary.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"""
1414

1515

16+
from typing import Optional
1617
from twilio.base import deserialize
1718
from twilio.base import serialize
1819
from twilio.base import values
@@ -166,7 +167,7 @@ class Status(object):
166167
COMPLETED = "completed"
167168
FAILED = "failed"
168169

169-
def __init__(self, version, payload, account_sid: str, sid: str = None):
170+
def __init__(self, version, payload, account_sid: str, sid: Optional[str] = None):
170171
"""
171172
Initialize the FeedbackSummaryInstance
172173

0 commit comments

Comments
 (0)