Change8

0.16.4

📦 ruffView on GitHub →
9 features🐛 7 fixes🔧 5 symbols

Summary

This release introduces new features like autofix for flake8-use-pathlib and improved server diagnostics for notebooks. It also includes several bug fixes, including addressing `InvalidInstruction` on specific Windows CPUs and handling semantic syntax errors in string type definitions.

✨ New Features

  • Add autofix for flake8-use-pathlib rule `PTH116`.
  • Restrict refurb rule `FURB131` (delete-full-slice) to lists.
  • Skip refurb rules `FURB101` and `FURB103` when the `open` argument is a file descriptor.
  • Align mixed t-string/bytes error message with CPython 3.14.
  • Add `ctypes.LittleEndianStructure` and related types to exception `RUF012`.
  • Detect duplicate keyword arguments.
  • Detect parameters declared `nonlocal`.
  • Offer display-only fixes and mark safe fixes preferred in the server.
  • Support pull diagnostics for notebook cells in the server.

🐛 Bug Fixes

  • Fix `InvalidInstruction` on Windows CPUs that do not support `POPCNT`.
  • Emit semantic syntax errors in string type definitions as `F722`.
  • Allow `os._exit` imports in `import-private-name` (`PLC2701`).
  • Fix s390x stacker assembly in release builds.
  • Guarantee minimum stack size when parsing a module, standalone expression, and suites.
  • Reduce configuration deserialization code size.
  • Check packed AST index bounds.

Affected Symbols