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
Fix: require-await ignore async generators (fixes #12459) #13048
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.
Thanks for working on this!
Also, can we change the commit message from |
ok I will do that 👍 |
7bc8bc0
to
0d7f521
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.
One small typo in the docs, but otherwise LGTM!
Co-Authored-By: Kai Cataldo <kai@kaicataldo.com>
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.
Can you please add one valid test without yield *
(and without await
of course).
From #12459 it isn't entirely clear should the rule ignore all async generators or only those with yield *
.
I believe the decision was to ignore all async generators, so it would be nice to have a test case that shows this intention.
cc @mdjermanovic I added few tests without Not sure why PR title is not passing ! |
PR title had extra spaces at start/end. |
oh, my bad ! thanks 👍 |
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.
LGTM, thanks!
Is this a duplicate of #12484? |
ohh, completely missed that. I think yeah... I think it's better to ping in that first to know if he is still active and wants that to be landed. I will close this one then. Else we can go with this if that seems in-active |
@bradzacher Thanks for pointing that out. Given the lack of response from the author of the other PR, I have closed it in favor of this one. |
Thanks for contributing! |
Prerequisites checklist
What is the purpose of this pull request? (put an "X" next to an item)
[X] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[X] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[ ] Other, please explain:
Fixes #12459
What changes did you make? (Give an overview)
after this change,
require-await
rule won't check for async generator functions . So an async generator function having no await wont report any errorIs there anything you'd like reviewers to focus on?
#12459