Change8

0.15.17

📦 ruffView on GitHub →
8 features🐛 4 fixes🔧 5 symbols

Summary

This release enhances suppression comment handling with support for human-readable names and improved range respect. It also introduces new rules, including banning `pytest` autouse fixtures, and fixes several diagnostic and formatting bugs.

✨ New Features

  • Allow human-readable names in suppression comments.
  • Prioritize human-readable names in CLI output.
  • Respect diagnostic start and parent ranges and trailing comments in `ruff:ignore` suppressions.
  • ["flake8-async"] Add `trio.as_safe_channel` to safe decorators (`ASYNC119`).
  • ["flake8-pytest-style"] Also check `pytest_asyncio` fixtures.
  • ["ruff"] Ban `pytest` autouse fixtures (`RUF076`).
  • ["pyupgrade"] Add `from __future__ import annotations` automatically (`UP007`, `UP045`).
  • Allow rule names in `ruff rule` command.

🐛 Bug Fixes

  • Fix handling of `ignore` comments within a `disable`/`enable` pair.
  • Fix diagnostic when `ruff:enable` or `ruff:disable` appears where `ruff:ignore` is expected.
  • ["pyupgrade"] Preserve leading empty literals to avoid syntax errors (`UP032`).
  • Fix playground diagnostics scrollbars.

Affected Symbols