-
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
allow eth.filter to return appropriate sync/async filter types #2645
allow eth.filter to return appropriate sync/async filter types #2645
Conversation
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.
Module
has a property called is_async
already. I think we could use that to differentiate instead of adding another is_async
property on Method
.
Also, I haven't tested this, but it looks like you could also combine the filter_wrapper
with async_filter_wrapper
if you wanted to. That's more of a stylistic thing though :) Otherwise, this looks good!
web3/_utils/method_formatters.py
Outdated
LogFilter, | ||
]: | ||
|
||
if type(module).__name__ == "Eth": |
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.
Sorry if this is just a wip and you don't want feedback, but could you check for module.is_async
here?
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.
No problem - feedback always welcome, especially if I've asked for review. Will try it.
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.
Ok, updated, ready for re-review.
3cf4b51
to
c77aa42
Compare
6b78d6c
to
1266958
Compare
c77aa42
to
2a21a0f
Compare
2a21a0f
to
61b52b6
Compare
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.
Nice! LGTM!
* update method_formatters.py to select the appropriate sync/async filter type
* update method_formatters.py to select the appropriate sync/async filter type
* update method_formatters.py to select the appropriate sync/async filter type
* update method_formatters.py to select the appropriate sync/async filter type
…eum#2645) * update method_formatters.py to select the appropriate sync/async filter type
* update method_formatters.py to select the appropriate sync/async filter type
Calls to AsyncEth.filter were returning sync filter types
How was it fixed?
Updated associated plumbing, added testing
Cute Animal Picture