pypi ruff 0.9.7

2 days ago

Release Notes

Preview features

  • Consider __new__ methods as special function type for enforcing class method or static method rules (#13305)
  • [airflow] Improve the internal logic to differentiate deprecated symbols (AIR303) (#16013)
  • [refurb] Manual timezone monkeypatching (FURB162) (#16113)
  • [ruff] Implicit class variable in dataclass (RUF045) (#14349)
  • [ruff] Skip singleton starred expressions for incorrectly-parenthesized-tuple-in-subscript (RUF031) (#16083)
  • [refurb] Check for subclasses includes subscript expressions (FURB189) (#16155)

Rule changes

  • [flake8-comprehensions]: Handle trailing comma in C403 fix (#16110)
  • [flake8-debugger] Also flag sys.breakpointhook and sys.__breakpointhook__ (T100) (#16191)
  • [pydocstyle] Handle arguments with the same names as sections (D417) (#16011)
  • [pylint] Correct ordering of arguments in fix for if-stmt-min-max (PLR1730) (#16080)
  • [pylint] Do not offer fix for raw strings (PLE251) (#16132)
  • [pyupgrade] Do not upgrade functional TypedDicts with private field names to the class-based syntax (UP013) (#16219)
  • [pyupgrade] Handle micro version numbers correctly (UP036) (#16091)
  • [pyupgrade] Unwrap unary expressions correctly (UP018) (#15919)
  • [ruff] Skip RUF001 diagnostics when visiting string type definitions (#16122)
  • [flake8-pyi] Avoid flagging custom-typevar-for-self on metaclass methods (PYI019) (#16141)
  • [pycodestyle] Exempt site.addsitedir(...) calls (E402) (#16251)

Formatter

  • Fix unstable formatting of trailing end-of-line comments of parenthesized attribute values (#16187)

Server

  • Fix handling of requests received after shutdown message (#16262)
  • Ignore source.organizeImports.ruff and source.fixAll.ruff code actions for a notebook cell (#16154)
  • Include document specific debug info for ruff.printDebugInformation (#16215)
  • Update server to return the debug info as string with ruff.printDebugInformation (#16214)

CLI

  • Warn on invalid noqa even when there are no diagnostics (#16178)
  • Better error messages while loading configuration extends (#15658)

Bug fixes

  • [refurb] Correctly handle lengths of literal strings in slice-to-remove-prefix-or-suffix (FURB188) (#16237)

Documentation

  • Add FAQ entry for source.* code actions in Notebook (#16212)
  • Add SECURITY.md (#16224)

Contributors

Install ruff 0.9.7

Install prebuilt binaries via shell script

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/ruff/releases/download/0.9.7/ruff-installer.sh | sh

Install prebuilt binaries via powershell script

powershell -ExecutionPolicy ByPass -c "irm https://github.com/astral-sh/ruff/releases/download/0.9.7/ruff-installer.ps1 | iex"

Download ruff 0.9.7

File Platform Checksum
ruff-aarch64-apple-darwin.tar.gz Apple Silicon macOS checksum
ruff-x86_64-apple-darwin.tar.gz Intel macOS checksum
ruff-aarch64-pc-windows-msvc.zip ARM64 Windows checksum
ruff-i686-pc-windows-msvc.zip x86 Windows checksum
ruff-x86_64-pc-windows-msvc.zip x64 Windows checksum
ruff-aarch64-unknown-linux-gnu.tar.gz ARM64 Linux checksum
ruff-i686-unknown-linux-gnu.tar.gz x86 Linux checksum
ruff-powerpc64-unknown-linux-gnu.tar.gz PPC64 Linux checksum
ruff-powerpc64le-unknown-linux-gnu.tar.gz PPC64LE Linux checksum
ruff-s390x-unknown-linux-gnu.tar.gz S390x Linux checksum
ruff-x86_64-unknown-linux-gnu.tar.gz x64 Linux checksum
ruff-armv7-unknown-linux-gnueabihf.tar.gz ARMv7 Linux checksum
ruff-aarch64-unknown-linux-musl.tar.gz ARM64 MUSL Linux checksum
ruff-i686-unknown-linux-musl.tar.gz x86 MUSL Linux checksum
ruff-x86_64-unknown-linux-musl.tar.gz x64 MUSL Linux checksum
ruff-arm-unknown-linux-musleabihf.tar.gz ARMv6 MUSL Linux (Hardfloat) checksum
ruff-armv7-unknown-linux-musleabihf.tar.gz ARMv7 MUSL Linux checksum

Don't miss a new ruff release

NewReleases is sending notifications on new releases.