Ruff v0.3.0 is released, promoting the formatter from beta to stable and shipping the 2024.2 style guide. Key changes include preferring to wrap assignment values over targets, parenthesizing multiple context managers in `with` statements for Python 3.9+, more condensed formatting of dummy function/class bodies, and improved multiline string handling. The release also highlights range formatting support (format only modified lines), f-string placeholder formatting in preview mode, and a new lint rule RUF028 that flags invalid formatter suppression comments that Ruff won't respect.
Table of contents
The Ruff 2024.2 style guide #Range Formatting #f-string placeholder formatting #Lint for invalid formatter suppression comments #Thank you! #Sort: