ruff 0.16.4

0.16.4
Added 4
  • Add autofix for PTH116 in flake8-use-pathlib
  • Detect duplicate keyword arguments in syntax-errors
  • Detect parameters declared nonlocal in syntax-errors
  • Support pull diagnostics for notebook cells in server
Changed 6
  • Restrict delete-full-slice to lists (FURB131) in refurb
  • Skip FURB101 and FURB103 when the open argument is a file descriptor in refurb
  • Align mixed t-string/bytes error message with CPython 3.14 in syntax-errors
  • Add ctypes.LittleEndianStructure and related types to existing exception (RUF012) in ruff
  • Offer display-only fixes and mark safe fixes preferred in server
  • Reduce configuration deserialization code size
Fixed 6
  • Fix InvalidInstruction on Windows CPUs that do not support POPCNT
  • Emit semantic syntax errors in string type definitions as F722 in pyflakes
  • Allow os._exit imports in import-private-name (PLC2701) in pylint
  • Fix s390x stacker assembly in release builds
  • Guarantee minimum stack size when parsing a module, standalone expression, and suites
  • Check packed AST index bounds

From ruff

Release Notes

Released on 2026-08-20.

Preview features
  • [flake8-use-pathlib] Add autofix for PTH116 (#26460)
  • [refurb] Restrict delete-full-slice to lists (FURB131) (#27711)
  • [refurb] Skip FURB101 and FURB103 when the open argument is a file descriptor (#27643)
Bug fixes
  • Fix InvalidInstruction on Windows CPUs that do not support POPCNT (#27803)
  • [pyflakes] Emit semantic syntax errors in string type definitions as F722 (#27835)
  • [pylint] Allow os._exit imports in import-private-name (PLC2701) (#27738)
Rule changes
  • [syntax-errors] Align mixed t-string/bytes error message with CPython 3.14 (#27766)
  • [ruff] Add ctypes.LittleEndianStructure and related types to existing exception (RUF012) (#27753)
  • [syntax-errors] Detect duplicate keyword arguments (#17804)
  • [syntax-errors] Detect parameters declared nonlocal (#27628)
Server
  • Offer display-only fixes and mark safe fixes preferred (#27807)
  • Support pull diagnostics for notebook cells (#27779)
Documentation
  • Add default indicator to rules table (#27724)
  • Fix broken link to Python docs (#27757)
Other changes
  • Fix s390x stacker assembly in release builds (#27776)
  • Guarantee minimum stack size when parsing a module, standalone expression, and suites (#25464)
  • Reduce configuration deserialization code size (#27924)
  • Check packed AST index bounds (#27849)
Contributors
Install ruff 0.16.4
Install prebuilt binaries via shell script
curl --proto '=https' --tlsv1.2 -LsSf https://releases.astral.sh/github/ruff/releases/download/0.16.4/ruff-installer.sh | sh
Install prebuilt binaries via powershell script
powershell -ExecutionPolicy Bypass -c "irm https://releases.astral.sh/github/ruff/releases/download/0.16.4/ruff-installer.ps1 | iex"
Download ruff 0.16.4
FilePlatformChecksum
ruff-aarch64-apple-darwin.tar.gzApple Silicon macOSchecksum
ruff-x86_64-apple-darwin.tar.gzIntel macOSchecksum
ruff-aarch64-pc-windows-msvc.zipARM64 Windowschecksum
ruff-i686-pc-windows-msvc.zipx86 Windowschecksum
ruff-x86_64-pc-windows-msvc.zipx64 Windowschecksum
ruff-aarch64-unknown-linux-gnu.tar.gzARM64 Linuxchecksum
ruff-i686-unknown-linux-gnu.tar.gzx86 Linuxchecksum
ruff-powerpc64-unknown-linux-gnu.tar.gzPPC64 Linuxchecksum
ruff-powerpc64le-unknown-linux-gnu.tar.gzPPC64LE Linuxchecksum
ruff-riscv64gc-unknown-linux-gnu.tar.gzRISCV Linuxchecksum
ruff-s390x-unknown-linux-gnu.tar.gzS390x Linuxchecksum
ruff-x86_64-unknown-linux-gnu.tar.gzx64 Linuxchecksum
ruff-armv7-unknown-linux-gnueabihf.tar.gzARMv7 Linuxchecksum
ruff-aarch64-unknown-linux-musl.tar.gzARM64 MUSL Linuxchecksum
ruff-i686-unknown-linux-musl.tar.gzx86 MUSL Linuxchecksum
ruff-x86_64-unknown-linux-musl.tar.gzx64 MUSL Linuxchecksum
ruff-arm-unknown-linux-musleabihf.tar.gzARMv6 MUSL Linux (Hardfloat)checksum
ruff-armv7-unknown-linux-musleabihf.tar.gzARMv7 MUSL Linuxchecksum
Verifying GitHub Artifact Attestations

The artifacts in this release have attestations generated with GitHub Artifact Attestations. These can be verified by using the GitHub CLI:

gh attestation verify <file-path of downloaded artifact> --repo astral-sh/ruff

You can also download the attestation from GitHub and verify against that directly:

gh attestation verify <file-path of downloaded artifact> --bundle <file-path of downloaded attestation>
View original

Upgraded? How did it go?

Discussion