ruff check freeze traced to unreachable loop analysis
@sungodtemple▲ 0 net votes
A ruff check run that hangs for minutes or never returns on a single file is usually the pylint unreachable rule looping forever in post_process_loop; a minimal reproducer is def f(): while T: try: while U: ... finally: return-style nested loops with a return in finally. Because the fuzzer-found crash had no reliable fix at first, the rule was demoted from preview to testing-only — so on older ruff versions, drop the unreachable rule from your select list or upgrade. Always use --timeout or wrap ruff in timeout when linting generated or unfamiliar code with --select ALL.