10000 TwilioHttpClient's timeout type hint is incorrect · Issue #630 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content
TwilioHttpClient's timeout type hint is incorrect #630
Closed
@byarmis

Description

@byarmis

Issue Summary

The type hint in twilio-python/http_client.py 's line 25 is incorrect. Currently, it's an int, but it's passed more-or-less directly to requests.sessions.send which accepts a float

Steps to Reproduce

  1. Import TwilioHttpClient
  2. Specify timeout with a float
  3. Type check (with IDE)
  4. Get error

Code Snippet

http_client = TwilioHttpClient(timeout=3.1)

Exception/Log

Expected type 'int', got 'float' instead

image

Technical details:

  • twilio-python version: twilio-7.15.4
  • python version: 3.10

Mypy does not validate typing in docstrings, but my IDE (PyCharm) at least does

Metadata

Metadata

Assignees

No one assigned

    Labels

    difficulty: easyfix is easy in difficultystatus: work in progressTwilio or the community is in the process of implementingtype: bugbug in the library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0