Skip to content

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

Closed

Description

@Zac-HD

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

Activity

  1. Zac-HD commented on Jul 21, 2022

    @Zac-HD
    MemberAuthor

    Fixed in adfaa56

  2. added 2 commits that reference this issue on Jul 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions