mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-16 00:37:10 +08:00
Use MutableMapping for headers (#6969)
This commit is contained in:
@@ -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 = ...,
|
||||
|
||||
Reference in New Issue
Block a user