Ruff v0.0.278 ships with improved suppression comment handling, including warnings for invalid `# noqa` directives and support for `# flake8: noqa: <code>` syntax. New rules include RUF015 (avoid unnecessary list allocation for first element), RUF016 (invalid index type), B034 (re.sub positional args), PYI030 (unnecessary literal union), PLC0105 (type name incorrect variance), and PLC0131 (typevar bivariance). The release also includes glob support for isort's `known-first-party` setting and numerous bug fixes.

8m read timeFrom astral.sh
Post cover image
Table of contents
Invalid # noqa directives now emit warnings #flake8: noqa comments now support suppressing dedicated codes #isort's known-first-party and friends now accept globs #New rule: unnecessary-list-allocation-for-first-element ( RUF015 ) #New rule: invalid-index-type ( RUF016 ) #New rule: re-sub-positional-args ( B034 ) #New rule: unnecessary-literal-union ( PYI030 ) #New rule: type-name-incorrect-variance ( PLC0105 ) #New rule: typevar-bivariance ( PLC0131 ) #Bug fixes #

Sort: