Skip to content

Commit 595c30e

Browse files
[stdlib] Update the return type of urllib.request.urlopen to urllib.response.addinfourl | http.client.HTTPResponse
Signed-off-by: Edgar Ramírez-Mondragón <edgarrm358@gmail.com>
1 parent bbbf753 commit 595c30e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stdlib/urllib/request.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if sys.version_info < (3, 14):
4949
__all__ += ["URLopener", "FancyURLopener"]
5050

5151
_T = TypeVar("_T")
52-
_UrlopenRet: TypeAlias = Any
52+
_UrlopenRet: TypeAlias = addinfourl | HTTPResponse
5353
_DataType: TypeAlias = ReadableBuffer | SupportsRead[bytes] | Iterable[bytes] | None
5454

5555
if sys.version_info >= (3, 13):

0 commit comments

Comments
 (0)