10000 False alarm for `TRIO100` warning: `async for` and `async with` are equivalent to `await` · Issue #6 · python-trio/flake8-async · GitHub
[go: up one dir, main page]

Skip to content

False alarm for TRIO100 warning: async for and async with are equivalent to await #6

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

Closed
Zac-HD opened this issue Jul 20, 2022 · 1 comment

Comments

@Zac-HD
Copy link
Member
Zac-HD commented Jul 20, 2022

Per the Trio docs, async for and async with are equivalent to await in the sense that they're also checkpoints. The following code should therefore not emit a warning:

with trio.move_on_after(10):
    async for x in ...:
        pass

with trio.move_on_after(10):
    async with ...:
        pass
@Zac-HD
Copy link
Member Author
Zac-HD commented Jul 21, 2022

Fixed in adfaa56

@Zac-HD Zac-HD closed this as completed Jul 21, 2022
jakkdl added a commit to jakkdl/flake8-async that referenced this issue Jul 30, 2022
jakkdl added a commit to jakkdl/flake8-async that referenced this issue Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0