ryantam626 / jupyterlab_code_formatter

A JupyterLab plugin to facilitate invocation of code formatters.
MIT License
822 stars 52 forks source link

Support ruff formatter #330

Open devmcp opened 7 months ago

devmcp commented 7 months ago

As of ruff v0.1.2 it supports formatting as well as linting. It would be great to support this natively.

There is a walkthrough here with a workaround, but I couldn't get it to work (I get "Formatter ruff_format not found" despite adding it to the jupyterlab config and restarting jupyterlab).

samsja commented 5 months ago

any news on this issue ? Big fan of this project and ruff is great

axeltlarsson commented 3 months ago

I'd love for this project to natively support ruff too.

Meanwhile I'm trying out the workaround linked above, but having some issues with the fact that formatting through jyputerlab_code_formatter doesn't format the same way as if running ruff format from the command line... Mildly infuriating to say the least, and makes it really difficult to use in CI. Any ideas why? It should use the same binary and version, it's just one goes through jyputerlab_code_formatter and the other doesn't as far as I can tell.