Improve typing #701
karpetrosyan
started this conversation in
Ideas
Replies: 1 comment
-
That's an interesting suggestion, and you're not the first to make it. I'm not sure about it because... The extensions that are valid depend on the transport that's in use. Using the dict typing here implies (or is implied by) that loose coupling. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Should we replace
Dict[str, any]
withtyping.TypedDict
as an Extensions type?Now:
That means any dictionary with the key type of
str
can be passed, and the type checker will recognize it as a valid dictionary.Usage of TypeDict
It's a good UX improvement, in my opinion.
Beta Was this translation helpful? Give feedback.
All reactions