Closed jakkdl closed 3 months ago
I noticed the "exclude x.aclose()" just now, I don't remember the reasoning behind that, so idk if 120 should respect it as well.
I just reread https://github.com/python-trio/trio/issues/455#issuecomment-2136041817 and noticed
I guess we should add any other except-that-raises here.
and realized that this check does not filter on whether-the-except-would-otherwise-raise, so this will currently give an async120 error:
try:
...
except ValueError:
# we don't give a shit about ValueError
await doSomeOtherThing()
can fix it by saving the potential async120 errors in a container and only report them upon reaching a raise
(I haven't forgotten this, I just need to think it through carefully and haven't had a block of time free to do that lately)
First part of #262
It's maybe not great to have the same error messages for both 102 and 120, and docs could maybe be improved as well.