All apps/Ruff

Ruff

ruff

An extremely fast Python linter and code formatter, written in Rust.

Runs as ruff|macOS, Linux, Windows|docs.astral.sh

Command form

ai-draft · 5 tasks · 18 fields

Lint and format Python code. Global options (--config, --isolated) are not included.

Opens the form; the finished command lands at your prompt, unrun
otty gui ruff

ruff check

Lint

Run the Ruff linter on files or directories.

LintExample values, fixed in this page — nothing here reaches a terminal
Basic
Files or directories
any
Enable rules
string
Disable rules
string
Advanced
Output format
string
TasksEach one presets the form for one job
Lint
pathsselectignoreoutput_format
Lint and fix
pathsfix
Preview fixes as diff
pathsdiff
ParametersOnly these flags are editable in the form
Files or directories
path · positional 0 · repeatable
Apply fixes
boolean
--fix
Include unsafe fixes
boolean
--unsafe-fixes
Show diff, write nothing
boolean
--diff
Enable rules
Comma-separated rule codes, or ALL.
string
--select
Disable rules
Comma-separated rule codes.
string
--ignore
Output format
string
--output-formatconcisefulljsonjson-linesjunitgroupedgithubgitlabpylintrdjsonazuresarif
Target Python version
string
--target-versionpy37py38py39py310py311py312py313
Show statistics
boolean
--statistics
Watch for changes
boolean
--watch-w
Exclude paths
string
--exclude
Always exit 0
boolean
--exit-zero-e

ruff format

Format

Run the Ruff formatter on files or directories.

FormatExample values, fixed in this page — nothing here reaches a terminal
Basic
Files or directories
any
TasksEach one presets the form for one job
Format
paths
Check formatting
pathscheck
ParametersOnly these flags are editable in the form
Files or directories
path · positional 0 · repeatable
Check only
boolean
--check
Show diff, write nothing
boolean
--diff
Line length
integer
--line-length
Target Python version
string
--target-versionpy37py38py39py310py311py312py313
Exclude paths
string
--exclude
SourcesEvery flag above is checked against these
fig
completion

github.com

fig
completion

github.com

fig
completion

github.com

Before it fills your prompt, Otty checks the installed ruff against its version. A form that does not match your version is not offered.