Skip to content

Upgrading ruff 0.4 to 0.5

Breaking0.4.10 → 0.5.7Breaking21Deprecated1New32Changed69Fixed66Other14

BreakingUpgrade verdict

21 breaking changes.

  • 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.
Top 4 of 22 that need code or config changes
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-format
Removes the deprecated tab-size setting; use indent-width.
tab-sizeindent-width
Removes the deprecated --show-source CLI option; use --output-format=full.
--show-source--output-format
Removes the deprecated --no-show-source CLI option; use --output-format=concise.
--no-show-source--output-format
Removes the deprecated ruff <path> command; use ruff check <path>.
ruffruff check
Removes the deprecated ruff --clean command; use ruff clean.
ruff --cleanruff clean
Removes the deprecated ruff --generate-shell-completion command; use ruff generate-shell-completion.
ruff --generate-shell-completionruff generate-shell-completion
Follows the XDG specification to discover user-level configurations on macOS, matching other Unix platforms.
Selecting ALL now excludes deprecated rules.
ALL
Released archives now include an extra level of nesting, removable with --strip-components=1 when untarring.
--strip-components=1
The diagnostic ranges for some flake8-bandit rules were modified.
flake8-bandit
Remaps blocking-http-call-in-async-function from ASYNC100 to ASYNC210.
blocking-http-call-in-async-functionASYNC100ASYNC210
Splits open-sleep-or-subprocess-in-async-function from ASYNC101 into ASYNC220, ASYNC221, ASYNC230, and ASYNC251.
open-sleep-or-subprocess-in-async-functionASYNC101ASYNC220ASYNC221ASYNC230ASYNC251
Merges blocking-os-call-in-async-function (ASYNC102) into ASYNC220 and ASYNC221.
blocking-os-call-in-async-functionASYNC102ASYNC220ASYNC221
Remaps trio-timeout-without-await from TRIO100 to ASYNC100.
trio-timeout-without-awaitTRIO100ASYNC100
Remaps trio-sync-call from TRIO105 to ASYNC105.
trio-sync-callTRIO105ASYNC105
Remaps trio-async-function-with-timeout from TRIO109 to ASYNC109.
trio-async-function-with-timeoutTRIO109ASYNC109
Remaps trio-unneeded-sleep from TRIO110 to ASYNC110.
trio-unneeded-sleepTRIO110ASYNC110
Remaps trio-zero-sleep-call from TRIO115 to ASYNC115.
trio-zero-sleep-callTRIO115ASYNC115
Remaps repeated-isinstance-calls from PLR1701 to SIM101.
repeated-isinstance-callsPLR1701SIM101
Deprecated1
Deprecates the syntax-error rule (E999) since syntax errors are now always shown.
syntax-errorE999