From ff3c3b8373c6f67c2b1f79bf543e1f4e7f655e95 Mon Sep 17 00:00:00 2001 From: "Elton H.Y. Chou" Date: Thu, 8 Sep 2022 08:00:38 +0800 Subject: [PATCH] Fix urllib3.response.HTTPResponse.geturl() return type (#8704) urllib3.response.HTTPResponse.geturl() return should be `str | None`. Source: https://github.com/urllib3/urllib3/blob/3951d3cf8f8c8119c455ce50c171dc0ca50cb130/src/urllib3/response.py#L416-L417 --- stubs/urllib3/urllib3/response.pyi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/urllib3/urllib3/response.pyi b/stubs/urllib3/urllib3/response.pyi index f5b8d25cb..c68cd3ebf 100644 --- a/stubs/urllib3/urllib3/response.pyi +++ b/stubs/urllib3/urllib3/response.pyi @@ -99,4 +99,4 @@ class HTTPResponse(io.IOBase): def readinto(self, b: bytearray) -> int: ... def supports_chunked_reads(self) -> bool: ... def read_chunked(self, amt: int | None = ..., decode_content: bool | None = ...) -> Iterator[bytes]: ... - def geturl(self) -> bool | str: ... + def geturl(self) -> str | None: ...