Use MutableMapping for headers (#6969)

This commit is contained in:
q0w authored and GitHub committed 2022-01-22 12:01:29 +02:00
1 parent d053d8ffea
commit 4e97b06175
1 file changed
+3 -3
+3 -3
View File
@@ -4,7 +4,7 @@ from _typeshed import StrOrBytesPath
from email.message import Message
from http.client import HTTPMessage, HTTPResponse, _HTTPConnectionProtocol
from http.cookiejar import CookieJar
from typing import IO, Any, Callable, ClassVar, Mapping, NoReturn, Pattern, Sequence, TypeVar, overload
from typing import IO, Any, Callable, ClassVar, Mapping, MutableMapping, NoReturn, Pattern, Sequence, TypeVar, overload
from urllib.error import HTTPError
from urllib.response import addclosehook, addinfourl
@@ -52,7 +52,7 @@ class Request:
origin_req_host: str
selector: str
data: bytes | None
headers: dict[str, str]
headers: MutableMapping[str, str]
unredirected_hdrs: dict[str, str]
unverifiable: bool
method: str | None
@@ -61,7 +61,7 @@ class Request:
self,
url: str,
data: bytes | None = ...,
headers: dict[str, str] = ...,
headers: MutableMapping[str, str] = ...,
origin_req_host: str | None = ...,
unverifiable: bool = ...,
method: str | None = ...,