Skip to content

Commit c4e583b

Browse files
authored
fix type annotations in responses.py (#1711)
1 parent 795cf60 commit c4e583b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

starlette/responses.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def set_cookie(
112112
httponly: bool = False,
113113
samesite: typing.Optional[Literal["lax", "strict", "none"]] = "lax",
114114
) -> None:
115-
cookie: http.cookies.BaseCookie = http.cookies.SimpleCookie()
115+
cookie: "http.cookies.BaseCookie[str]" = http.cookies.SimpleCookie()
116116
cookie[key] = value
117117
if max_age is not None:
118118
cookie[key]["max-age"] = max_age
@@ -185,7 +185,7 @@ def __init__(
185185
self,
186186
content: typing.Any,
187187
status_code: int = 200,
188-
headers: typing.Optional[dict] = None,
188+
headers: typing.Optional[typing.Dict[str, str]] = None,
189189
media_type: typing.Optional[str] = None,
190190
background: typing.Optional[BackgroundTask] = None,
191191
) -> None:

0 commit comments

Comments
 (0)