Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typing for requests / stream #474

Merged
merged 5 commits into from
Jan 12, 2025
Merged

Typing for requests / stream #474

merged 5 commits into from
Jan 12, 2025

Conversation

novitae
Copy link
Contributor

@novitae novitae commented Jan 12, 2025

Adds typing for all the request methods, and streams. Covers:

  • Session (all methods + stream)
    Capture d’écran 2025-01-12 à 12 07 48
    All the Session.get, Session.post, ... now have the kwargs appearing when you start typing it. The argument method is obviously removed on those.
    Capture d’écran 2025-01-12 à 12 08 03
    Typing is also added for the Session.stream method, this time including the argument method.

  • AsyncSession (all methods + stream)
    Capture d’écran 2025-01-12 à 12 07 28
    Exactly the same as Session.

  • requests/__init__.py (all methods + request)
    Capture d’écran 2025-01-12 à 12 06 47
    All the get, post, ... includes the params thread, curl_options and debug that the request method supports, in addition to the classical request kwargs.

@mxrch
Copy link

mxrch commented Jan 12, 2025

Very good contribution, more typing is always appreciated

@lexiforest lexiforest merged commit 139f705 into lexiforest:main Jan 12, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants