How to run Ruff on scratch files?
已回答
Hi,
I use Ruff for formatting my project.
I have some python code snippets in my sphynx documentation, and I used to write them in scratches and to run Ruff on them before pasting them in the doc.
Recently, it seems to have stopped working (not sure but I guess that it was when Ruff was included within Pycharm?)
The Language Services window correctly shows that Ruff runs on other files (my project files) but I can't select anything for the (current) scratch.

Does anyone know how to toggle ruff on for formatting scratch files?
Thanks!
请先登录再写评论。
Unfortunately, this is a known bug on 2026.3 - https://youtrack.jetbrains.com/issue/PY-86120/New-ruff-formatting-feature-does-not-work-on-scratch-files
Subscribe to YouTrack to receive updates. We hopefully will address it in the next release
Thanks Miguel, will do!