Skip to content

Commit

Permalink
fix type annotations in responses.py (#1711)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangb committed Jun 28, 2022
1 parent 795cf60 commit c4e583b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions starlette/responses.py
Expand Up @@ -112,7 +112,7 @@ def set_cookie(
httponly: bool = False,
samesite: typing.Optional[Literal["lax", "strict", "none"]] = "lax",
) -> None:
cookie: http.cookies.BaseCookie = http.cookies.SimpleCookie()
cookie: "http.cookies.BaseCookie[str]" = http.cookies.SimpleCookie()
cookie[key] = value
if max_age is not None:
cookie[key]["max-age"] = max_age
Expand Down Expand Up @@ -185,7 +185,7 @@ def __init__(
self,
content: typing.Any,
status_code: int = 200,
headers: typing.Optional[dict] = None,
headers: typing.Optional[typing.Dict[str, str]] = None,
media_type: typing.Optional[str] = None,
background: typing.Optional[BackgroundTask] = None,
) -> None:
Expand Down

0 comments on commit c4e583b

Please sign in to comment.