Upgrading ruff 0.4 to 0.5
Breaking0.4.10 → 0.5.7Breaking21Deprecated1New32Changed69Fixed66Other14
BreakingUpgrade verdict
21 breaking changes.
In plain terms
- Downloaded release files are no longer named with the version number, so /latest download links on GitHub work.
- The text output format setting no longer exists; pick concise or full instead.
- The tab-size setting no longer exists; use indent-width instead.
- The --show-source flag no longer exists; use --output-format=full instead.
Must act Top 4 of 22 that need code or config changes
What you must change
Breaking21
The release artifact's file name no longer includes the version tag, enabling installs via
/latest URLs on GitHub.Removes the deprecated output-format=text setting; use concise or full.
output-formatRemoves the deprecated tab-size setting; use indent-width.
tab-sizeindent-widthRemoves the deprecated --show-source CLI option; use --output-format=full.
--show-source--output-formatRemoves the deprecated --no-show-source CLI option; use --output-format=concise.
--no-show-source--output-formatRemoves the deprecated ruff <path> command; use ruff check <path>.
ruffruff checkRemoves the deprecated ruff --clean command; use ruff clean.
ruff --cleanruff cleanRemoves the deprecated ruff --generate-shell-completion command; use ruff generate-shell-completion.
ruff --generate-shell-completionruff generate-shell-completionFollows the XDG specification to discover user-level configurations on macOS, matching other Unix platforms.
Selecting
ALL now excludes deprecated rules.ALLReleased archives now include an extra level of nesting, removable with
--strip-components=1 when untarring.--strip-components=1The diagnostic ranges for some
flake8-bandit rules were modified.flake8-banditRemaps
blocking-http-call-in-async-function from ASYNC100 to ASYNC210.blocking-http-call-in-async-functionASYNC100ASYNC210Splits
open-sleep-or-subprocess-in-async-function from ASYNC101 into ASYNC220, ASYNC221, ASYNC230, and ASYNC251.open-sleep-or-subprocess-in-async-functionASYNC101ASYNC220ASYNC221ASYNC230ASYNC251Merges
blocking-os-call-in-async-function (ASYNC102) into ASYNC220 and ASYNC221.blocking-os-call-in-async-functionASYNC102ASYNC220ASYNC221Remaps
trio-timeout-without-await from TRIO100 to ASYNC100.trio-timeout-without-awaitTRIO100ASYNC100Remaps
trio-sync-call from TRIO105 to ASYNC105.trio-sync-callTRIO105ASYNC105Remaps
trio-async-function-with-timeout from TRIO109 to ASYNC109.trio-async-function-with-timeoutTRIO109ASYNC109Remaps
trio-unneeded-sleep from TRIO110 to ASYNC110.trio-unneeded-sleepTRIO110ASYNC110Remaps
trio-zero-sleep-call from TRIO115 to ASYNC115.trio-zero-sleep-callTRIO115ASYNC115Remaps
repeated-isinstance-calls from PLR1701 to SIM101.repeated-isinstance-callsPLR1701SIM101Deprecations to plan for
Deprecated1
Deprecates the
syntax-error rule (E999) since syntax errors are now always shown.syntax-errorE999