DeepSource now supports The Ruff Formatter

Yesterday, ruff announced The Ruff Formatter, which is an extremely fast Python code formatter designed as a drop-in replacement for Black.

We are happy to announce Ruff Formatter support in DeepSource.

To enable it, add an entry in the transformers list in your .deepsource.toml, like so:

[[transformers]]
name = "ruff"

Or you can go to your Repository’s Settings → “Generate Configuration” and select “Ruff Formatter” in the Drop-Down menu:

image

DeepSource also respects your configuration for The Ruff Formatter. You can customize the formatter behaviour through a pyproject.toml file.

Happy formatting!

4 Likes