From 02841a4f3b16be47f2a3cf265e0ca9ea99186497 Mon Sep 17 00:00:00 2001 From: ANSHUL SINGH <72524975+ekanshul@users.noreply.github.com> Date: Thu, 20 Aug 2026 02:24:07 +0530 Subject: [PATCH 1/2] [requests] Type module constants and Response.links Co-Authored-By: Claude Fable 5 --- stubs/requests/requests/models.pyi | 10 +++++----- stubs/requests/requests/utils.pyi | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stubs/requests/requests/models.pyi b/stubs/requests/requests/models.pyi index 0e85e09a6a8f..0a598e596df7 100644 --- a/stubs/requests/requests/models.pyi +++ b/stubs/requests/requests/models.pyi @@ -45,10 +45,10 @@ super_len = utils.super_len to_native_string = utils.to_native_string codes = status_codes.codes -REDIRECT_STATI: Incomplete -DEFAULT_REDIRECT_LIMIT: Incomplete -CONTENT_CHUNK_SIZE: Incomplete -ITER_CHUNK_SIZE: Incomplete +REDIRECT_STATI: tuple[int, ...] +DEFAULT_REDIRECT_LIMIT: int +CONTENT_CHUNK_SIZE: int +ITER_CHUNK_SIZE: int class RequestEncodingMixin: @property @@ -164,6 +164,6 @@ class Response: **kwds: Any, ) -> Any: ... @property - def links(self) -> dict[Incomplete, Incomplete]: ... + def links(self) -> dict[str, dict[str, str]]: ... def raise_for_status(self) -> None: ... def close(self) -> None: ... diff --git a/stubs/requests/requests/utils.pyi b/stubs/requests/requests/utils.pyi index ecd3536463cf..1bc7640567fd 100644 --- a/stubs/requests/requests/utils.pyi +++ b/stubs/requests/requests/utils.pyi @@ -15,7 +15,7 @@ CaseInsensitiveDict = structures.CaseInsensitiveDict InvalidURL = exceptions.InvalidURL NETRC_FILES: tuple[str, str] -DEFAULT_CA_BUNDLE_PATH: Incomplete +DEFAULT_CA_BUNDLE_PATH: str DEFAULT_PORTS: dict[str, int] DEFAULT_ACCEPT_ENCODING: str From db933136c9d52d3c248272d2601815f3641bf21f Mon Sep 17 00:00:00 2001 From: ANSHUL SINGH <72524975+ekanshul@users.noreply.github.com> Date: Thu, 20 Aug 2026 02:27:13 +0530 Subject: [PATCH 2/2] [requests] Type hooks.HOOKS, default_hooks() and get_environ_proxies() Co-Authored-By: Claude Fable 5 --- stubs/requests/requests/hooks.pyi | 4 ++-- stubs/requests/requests/utils.pyi | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stubs/requests/requests/hooks.pyi b/stubs/requests/requests/hooks.pyi index f706016ca386..73bef16cda1c 100644 --- a/stubs/requests/requests/hooks.pyi +++ b/stubs/requests/requests/hooks.pyi @@ -1,6 +1,6 @@ from typing import Any -HOOKS: Any +HOOKS: list[str] -def default_hooks(): ... +def default_hooks() -> dict[str, list[Any]]: ... def dispatch_hook(key, hooks, hook_data, **kwargs): ... diff --git a/stubs/requests/requests/utils.pyi b/stubs/requests/requests/utils.pyi index 1bc7640567fd..87b608d7245b 100644 --- a/stubs/requests/requests/utils.pyi +++ b/stubs/requests/requests/utils.pyi @@ -1,5 +1,5 @@ import sys -from _typeshed import Incomplete, StrOrBytesPath +from _typeshed import StrOrBytesPath from collections.abc import Generator, Iterable, Mapping from contextlib import _GeneratorContextManager from io import BufferedWriter @@ -48,7 +48,7 @@ def is_ipv4_address(string_ip: str) -> bool: ... def is_valid_cidr(string_network: str) -> bool: ... def set_environ(env_name: str, value: None) -> _GeneratorContextManager[None]: ... def should_bypass_proxies(url: _Uri, no_proxy: str | None) -> bool: ... -def get_environ_proxies(url: _Uri, no_proxy: Iterable[str] | None = None) -> dict[Incomplete, Incomplete]: ... +def get_environ_proxies(url: _Uri, no_proxy: Iterable[str] | None = None) -> dict[str, str]: ... def select_proxy(url: _Uri, proxies: Mapping[str, str] | None) -> str | None: ... def resolve_proxies( request: Request | PreparedRequest, proxies: dict[str, str] | None, trust_env: bool = True