Skip to content

Extend ASYNC110 to also warn if looping a checkpoint() #201

Closed
@jakkdl

Description

@jakkdl

There being two sleep-related confusions can plausibly cause a bit of confusion, this code will raise TRIO115 (replace sleep(0) with checkpoint) and TRIO110 (replace looped sleep with an Event)

while foo():
  await trio.sleep(0)

but if the user resolves the ASYNC115, then ASYNC110 will also stop warning. I don't think it's something super common, but it happened in python-trio/trio#2947 (review) - so plausibly might happen again.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions