ruff_format
Format Python files with Ruff, check if formatting is needed, and set custom line length or config file path.
Instructions
Format Python code using Ruff
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to file or directory to format | |
| check_only | No | Only check if files need formatting, don't format | |
| config_path | No | Path to Ruff configuration file. If not provided, Ruff will auto-discover config files (pyproject.toml, ruff.toml) in the project directory. | |
| line_length | No | Maximum line length. Overrides config file setting. |