Skip to content

Type hint on PhoneNumberInstance.carrier should be dict instead of unicode #451

@sauravc

Description

@sauravc

The type hint on the carrier property incorrectly marks it as unicode instead of dict here: https://github.com/twilio/twilio-python/blob/6.21.0/twilio/rest/lookups/v1/phone_number.py#L244

Version:
6.21

Code Snippet

>>> p = client.lookups.phone_numbers('+12063211234').fetch(type='carrier')
>>> type(p.carrier)  # Type hint of unicode is incorrect: https://github.com/twilio/twilio-python/blob/6.21.0/twilio/rest/lookups/v1/phone_number.py#L244
<class 'dict'>

Steps to Reproduce

  1. Use Twilio Python SDK to do a Lookup API call on a phone number
  2. See the type of the carrier property of the resulting PhoneNumberInstance. It is not unicode, but a dict instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions