You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed this in my work on python-trio/trio#2947, it appears that TRIO100 does not detect async context managers.
minimal.py:
importtrioasyncdeftest_reentry_doesnt_deadlock() ->None:
# Regression test for issue noticed in GH-2827# The failure mode is to hang the whole test suite, unfortunately.# XXX consider running this in a subprocess with a timeout, if it comes up again!asyncdefchild() ->None:
whileTrue:
awaittrio.to_thread.run_sync(trio.from_thread.run, trio.sleep, 0, abandon_on_cancel=False)
withtrio.move_on_after(2):
asyncwithtrio.open_nursery() asnursery:
for_inrange(4):
nursery.start_soon(child)
> ruff check minimal.py --isolated --select TRIOminimal.py:12:5: TRIO100 A `with trio.move_on_after(...):` context does not contain any `await` statements. This makes it pointless, as the timeout can only be triggered by a checkpoint.
> ruff --versionruff 0.2.1
The text was updated successfully, but these errors were encountered:
Noticed this in my work on python-trio/trio#2947, it appears that
TRIO100
does not detect async context managers.minimal.py
:The text was updated successfully, but these errors were encountered: