Change8

0.12.4

📦 ruffView on GitHub →
3 features🐛 7 fixes🔧 12 symbols

Summary

Ruff 0.12.4 introduces new preview features for future annotations, autofixes, and indirect pathlib detection, along with numerous bug fixes and rule adjustments.

✨ New Features

  • Add `from __future__ import annotations` for flake8-type-checking, pyupgrade, and ruff when it would enable new fixes (TC001, TC002, TC003, UP037, RUF013) ([#19100](https://github.com/astral-sh/ruff/pull/19100))
  • Add autofix for PTH109 in flake8-use-pathlib ([#19245](https://github.com/astral-sh/ruff/pull/19245))
  • Detect indirect pathlib.Path usages for unspecified-encoding (PLW1514) in pylint ([#19304](https://github.com/astral-sh/ruff/pull/19304))

🐛 Bug Fixes

  • Fix B017 false negatives for keyword exception arguments in flake8-bugbear ([#19217](https://github.com/astral-sh/ruff/pull/19217))
  • Fix false negative on direct Path() instantiation (PTH210) in flake8-use-pathlib ([#19388](https://github.com/astral-sh/ruff/pull/19388))
  • Fix DJ008 false positive for abstract models with type-annotated abstract field in flake8-django ([#19221](https://github.com/astral-sh/ruff/pull/19221))
  • Fix I002 import insertion after docstring with multiple string statements in isort ([#19222](https://github.com/astral-sh/ruff/pull/19222))
  • Treat form feed as valid whitespace before a semicolon in isort ([#19343](https://github.com/astral-sh/ruff/pull/19343))
  • Fix SyntaxError from fixes with line continuations (D201, D202) in pydoclint ([#19246](https://github.com/astral-sh/ruff/pull/19246))
  • FURB164 fix should validate arguments and should usually be marked unsafe in refurb ([#19136](https://github.com/astral-sh/ruff/pull/19136))

🔧 Affected Symbols

flake8-type-checkingpyupgraderuffflake8-use-pathlibpylintflake8-bugbearflake8-djangoisortpydoclintrefurbpep8_namingpycodestyle