You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
http.cookies.Morsel type for flags should allow for bool #3059
I would have liked to directly open a pull request but I am not sure what the right way to fix it is:
Generally all attributes can be set to any type as they are cast to strings anyway so Dict[str, any] does reflect the implementation fine.
A TypedDict defining all possible keys with their intended options would have to be somewhat opinionated, for example m['path']=1 is okay from the implementation point of view of Morsel but probably is not intended.
Activity
asvetlov commentedon Jun 15, 2019
I think
TypedDictis better here: the only limited set of key names is supported by MorselFlorianLudwig commentedon Jun 16, 2019
I just realized that
TypedDictis inmypy_extensionswhich is not used within typeshed. With PEP 589 in python 3.8 it comes to the stdlib.So for now
Dict[str, any]seems the way to go.change http.cookie.Morsel to Dict[str, any]
change http.cookies.Morsel to Dict[str, Any]
change http.cookies.Morsel to Dict[str, Any]
change http.cookies.Morsel to Dict[str, Any] (#3060)