Skip to content

[requests] Type module constants and Response.links - #16266

Open
ekanshul wants to merge 2 commits into
python:mainfrom
ekanshul:requests-constants
Open

[requests] Type module constants and Response.links#16266
ekanshul wants to merge 2 commits into
python:mainfrom
ekanshul:requests-constants

Conversation

@ekanshul

@ekanshul ekanshul commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

REDIRECT_STATI, DEFAULT_REDIRECT_LIMIT, CONTENT_CHUNK_SIZE, ITER_CHUNK_SIZE, utils.DEFAULT_CA_BUNDLE_PATH, hooks.HOOKS, the Response.links property and the return types of hooks.default_hooks() and utils.get_environ_proxies() were Incomplete/Any although their runtime types are fixed: the constants are a tuple of status codes, plain ints, the certs.where() path string and the list of hook names; links maps each parsed Link header's rel (or URL) to the dict[str, str] returned by parse_header_links(); default_hooks() returns a dict of empty lists per hook name; and get_environ_proxies() returns urllib.request.getproxies() or an empty dict.

Agent used: Claude Code

ekanshul and others added 2 commits August 20, 2026 02:24
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant