Closed jakkdl closed 1 month ago
Got the major shit working, but needs some cleanup, comments, documentation and a self-review pass. So no need to review yet.
Added a couple corner cases, I don't think wrapping calls is terribly common - but if it is feel free to open an issue and I'll make it search for the matching calls differently.
# wrapped calls do not raise errors
with customWrapper(trio.fail_at(10)):
...
with (res := trio.fail_at(10)):
...
# but saving with `as` does
with trio.fail_at(10) as res: # ASYNC912: 9
if bar():
await trio.lowlevel.checkpoint()
oh, turns out #183 was already planning on using ASYNC912.
It looks like I broke some stuff, but I gotta go for the day so I thought I'd push in case you have time to review
tests/eval_files/async912.py
and have any opinions on the behavior in some of the edge cases in there.