-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use TypedDict for **kwargs type checking #2849
Conversation
cb638bc
to
e6c86a4
Compare
06f16ba
to
91e530e
Compare
The remaining lint errors are from the submodule |
|
As far as I know this is still an experimental feature. I'm open to including it, but I'm not certain that it's desirable at this stage. Considering this for the next major release, |
|
Nice find. I think we should aim to put in |
No reason not to include in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was wrong?
web3.py/web3/eth/eth.py
Lines 551 to 555 in 168fcea
After Mypy 0.981, it supports precise type annotations for
**kwargs
using TypedDict (python/mypy#13471), like**transaction_params: Any
can be rewritten as**transaction_params: Unpack[TxParams]
.How was it fixed?
**kwarg
type checking withUnpack[TxParams]
.Unpack
type. TheUnpack
is a built-in type after Python 3.11, so I updated theweb3/_utils/compat
.Todo:
Cute Animal Picture