Skip to content

Commit

Permalink
Properly type SimpleCookie.
Browse files Browse the repository at this point in the history
This definition makes it usable even in pyright's strict mode.
See microsoft/pyright#5927 for details.
  • Loading branch information
apollo13 committed Sep 11, 2023
1 parent f5e65d2 commit e98abf0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django-stubs/http/cookie.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
from http import cookies
from typing import Any

SimpleCookie: Any
from typing_extensions import TypeAlias

SimpleCookie: TypeAlias = cookies.SimpleCookie[Any]

def parse_cookie(cookie: str) -> dict[str, str]: ...

0 comments on commit e98abf0

Please sign in to comment.