Installed Ruff in CodeRunner: but uh, a bit stuck how to use it!

Re: Installed Ruff in CodeRunner: but uh, a bit stuck how to use it!

by Oli Howson -
Number of replies: 0
Yes as suspected it was a path issue - calling by /path/to/ruff it works fine.

worth noting for future issues:
1) You can drop a ruff.toml cofig file in the support files no problem - very useful
2) Using Richard's method is better than mine:

with open("__student_answer__.py", "w") as outfile:
outfile.write(__student_answer__)
subprocess.run("ruff check -q __student_answer__.py".split())

Otherwise it picks up on all our naughty code in the tester as well :)

so a win!