After reviewing the codebase, I found that stop_event is always polled, never awaited. Its type can therefore be safely broaden from AnyEvent (anyio.Event | trio.Event | asyncio.Event) to AbstractEvent, which will make awatch more consistent with watch.
After reviewing the codebase, I found that
stop_eventis always polled, never awaited. Its type can therefore be safely broaden fromAnyEvent(anyio.Event | trio.Event | asyncio.Event) toAbstractEvent, which will makeawatchmore consistent withwatch.