Ruff Plugin

Adapter plugin that formats Python code via Ruff.

Formats .py and .pyi files.

Note: For formatting .ipynb files, use the Jupyter plugin along with this plugin.

Install and Setup

In your project's directory with a dprint.json file, run:

dprint config add ruff

This will update your config file to have an entry for the plugin. Then optionally specify a "ruff" property to add configuration:

{
  "ruff": {
    // ruff's config goes here
  },
  "plugins": [
    "https://plugins.dprint.dev/ruff-x.x.x.wasm"
  ]
}

Configuration

See Configuration

Playground

See Playground