Avoid syntax error via importing trio.lowlevel by charliermarsh · Pull Request #8730 · astral-sh/ruff (original) (raw)

We ended up with a syntax error here via from trio import lowlevel.checkpoint. The new solution avoids that error, but does miss cases like:

from trio.lowlevel import Timer

Where it could insert from trio.lowlevel import Timer, checkpoint. Instead, it'll add from trio import lowlevel.

See: #8402 (comment)