-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
await-not-async missed & false alarms with genexp and list comprehensions #18124
Comments
I can try to pick this one up if it helps :) |
@josetapadas Please, feel free! You can check out CONTRIBUTING.md and the Developer Guides for contributing guidelines and tips on where to start. Thanks! |
hi there @brianschubert , I've opened #18152 to try and address this issue. (So this is my first attempt to contribute to this great project so any guidance on a mistakeful approach would be very appreciated! 🙈) I've attempted to as well use a file like the one in the example to verify the fix:
to verify if the errors were in the proper place:
|
hello, I've opened #18152 with a collaborator review already. We need some guidance to proceed, anyone I can ask for assistance on this one? |
Bug Report
await-not-async does not warn on
async for
in list and dict comprehensions, and incorrectly does give a warning forawait
insideGeneratorExp.elt
.For list & dict comprehensions you should error on any
await
orasync for
, but for generator expressions it's only the generator that should be checked.To Reproduce
Expected Behavior
It should error on 8, 9, 12 and 13
Actual Behavior
Your Environment
mypy.ini
(and other config files):also see astral-sh/ruff#14167 that had the exact same issues
The text was updated successfully, but these errors were encountered: