Change8

0.15.2

📦 ruffView on GitHub →
2 features🐛 6 fixes🔧 9 symbols

Summary

This release significantly expands the default rule set available in preview mode, adding 412 rules while removing a few older, overlapping ones. It also includes various bug fixes across several integrated linters and parser improvements.

Migration Steps

  1. If you use preview mode and prefer the old default rule set, restore it by configuring `select = ["E4", "E7", "E9", "F"]` under `[lint]` in your `ruff.toml` or `[tool.ruff.lint]` in your `pyproject.toml`.

✨ New Features

  • In preview, Ruff enables a significantly expanded default rule set of 412 rules, up from the stable default set of 59 rules.
  • The flake8-pyi rule PYI041 now also checks string annotations.

🐛 Bug Fixes

  • Fixed in-async-context logic for flake8-async.
  • Fixed RUF102 to delete the entire comment.
  • Suppressed diagnostic for RUF027 for strings with backslashes in interpolations before Python 3.12.
  • Fixed B023 false positive for immediately-invoked lambdas in flake8-bugbear.
  • Fixed false syntax error for match-like annotated assignments in the parser.
  • Fixed indentation tracking after line continuations in the parser.

Affected Symbols