requests: Response.encoding can be None (#6067)

The type of the `encoding` attribute was previously typed as `str`, even though it can be `None` at runtime.
This commit is contained in:
Sebastian Rittau
2021-09-25 10:50:36 +02:00
committed by GitHub
parent 2217ac8a8c
commit 3128c6afbf

View File

@@ -93,7 +93,7 @@ class Response:
headers: CaseInsensitiveDict[str]
raw: Any
url: str
encoding: str
encoding: str | None
history: list[Response]
reason: str
cookies: RequestsCookieJar