ruff/changelogs/0.2.x.md
Brent Westbrook 9220addf52
Split the changelog into separate files (#18725)
Summary
--

During the release today, I noticed that the changelog is finally too
long to
render at all on GitHub. This PR follows the same splitting procedure as
in
uv (astral-sh/uv#11510, astral-sh/uv#12099): first splitting the file
into one
per minor version, and then reversing the contents of each file to start
with
the breaking release (`changelogs/0.11.x.md` starts with 0.11.0 instead
of
0.11.13 as in the old changelog).

For the second part, I used
[`reverse-changelog.py`](https://github.com/astral-sh/uv/blob/main/scripts/reverse-changelog.py)
from the uv repo, so hopefully everything is correct. I spot-checked
0.7.0 at least.
2025-06-17 13:27:36 -04:00

20 KiB

Changelog 0.2.x

0.2.0

Breaking changes

  • The NURSERY selector cannot be used anymore
  • Legacy selection of nursery rules by exact codes is no longer allowed without preview enabled

See also, the "Remapped rules" section which may result in disabled rules.

Deprecations

The following rules are now deprecated:

The following command line options are now deprecated:

  • --show-source; use --output-format full instead
  • --no-show-source; use --output-format concise instead
  • --output-format text; use full or concise instead

The following settings have moved and the previous name is deprecated:

Remapped rules

The following rules have been remapped to new codes:

Stabilizations

The following rules have been stabilized and are no longer in preview:

Fixes for the following rules have been stabilized and are now available without preview:

Fixes for the following rules have been promoted from unsafe to safe:

The following behaviors have been stabilized:

Preview features

  • [refurb] Implement metaclass_abcmeta (FURB180) (#9658)
  • Implement blank_line_after_nested_stub_class preview style (#9155)
  • The preview rule and-or-ternary (PLR1706) was removed

Bug fixes

  • [flake8-async] Take pathlib.Path into account when analyzing async functions (#9703)
  • [flake8-return] - fix indentation syntax error (RET505) (#9705)
  • Detect multi-statement lines in else removal (#9748)
  • RUF022, RUF023: never add two trailing commas to the end of a sequence (#9698)
  • RUF023: Don't sort __match_args__, only __slots__ (#9724)
  • [flake8-simplify] - Fix syntax error in autofix (SIM114) (#9704)
  • [pylint] Show verbatim constant in magic-value-comparison (PLR2004) (#9694)
  • Removing trailing whitespace inside multiline strings is unsafe (#9744)
  • Support IfExp with dual string arms in invalid-envvar-default (#9734)
  • [pylint] Add __mro_entries__ to known dunder methods (PLW3201) (#9706)

Documentation

  • Removed rules are now retained in the documentation (#9691)
  • Deprecated rules are now indicated in the documentation (#9689)

0.2.1

This release includes support for range formatting (i.e., the ability to format specific lines within a source file).

Preview features

  • [refurb] Implement missing-f-string-syntax (RUF027) (#9728)
  • Format module-level docstrings (#9725)

Formatter

  • Add --range option to ruff format (#9733)
  • Don't trim last empty line in docstrings (#9813)

Bug fixes

  • Skip empty lines when determining base indentation (#9795)
  • Drop __get__ and __set__ from unnecessary-dunder-call (#9791)
  • Respect generic Protocol in ellipsis removal (#9841)
  • Revert "Use publicly available Apple Silicon runners (#9726)" (#9834)

Performance

  • Skip LibCST parsing for standard dedent adjustments (#9769)
  • Remove CST-based fixer for C408 (#9822)
  • Add our own ignored-names abstractions (#9802)
  • Remove CST-based fixers for C400, C401, C410, and C418 (#9819)
  • Use AhoCorasick to speed up quote match (#9773)
  • Remove CST-based fixers for C405 and C409 (#9821)
  • Add fast-path for comment detection (#9808)
  • Invert order of checks in zero-sleep-call (#9766)
  • Short-circuit typing matches based on imports (#9800)
  • Run dunder method rule on methods directly (#9815)
  • Track top-level module imports in the semantic model (#9775)
  • Slight speed-up for lowercase and uppercase identifier checks (#9798)
  • Remove LibCST-based fixer for C403 (#9818)

Documentation

  • Update max-pos-args example to max-positional-args (#9797)
  • Fixed example code in weak_cryptographic_key.rs (#9774)
  • Fix references to deprecated ANN rules in changelog (#9771)
  • Fix default for max-positional-args (#9838)

0.2.2

Highlights include:

  • Initial support formatting f-strings (in --preview).
  • Support for overriding arbitrary configuration options via the CLI through an expanded --config argument (e.g., --config "lint.isort.combine-as-imports=false").
  • Significant performance improvements in Ruff's lexer, parser, and lint rules.

Preview features

  • Implement minimal f-string formatting (#9642)
  • [pycodestyle] Add blank line(s) rules (E301, E302, E303, E304, E305, E306) (#9266)
  • [refurb] Implement readlines_in_for (FURB129) (#9880)

Rule changes

  • [ruff] Ensure closing parentheses for multiline sequences are always on their own line (RUF022, RUF023) (#9793)
  • [numpy] Add missing deprecation violations (NPY002) (#9862)
  • [flake8-bandit] Detect mark_safe usages in decorators (#9887)
  • [ruff] Expand asyncio-dangling-task (RUF006) to include new_event_loop (#9976)
  • [flake8-pyi] Ignore 'unused' private type dicts in class scopes (#9952)

Formatter

  • Docstring formatting: Preserve tab indentation when using indent-style=tabs (#9915)
  • Disable top-level docstring formatting for notebooks (#9957)
  • Stabilize quote-style's preserve mode (#9922)

CLI

  • Allow arbitrary configuration options to be overridden via the CLI (#9599)

Bug fixes

  • Make show-settings filters directory-agnostic (#9866)
  • Respect duplicates when rewriting type aliases (#9905)
  • Respect tuple assignments in typing analyzer (#9969)
  • Use atomic write when persisting cache (#9981)
  • Use non-parenthesized range for DebugText (#9953)
  • [flake8-simplify] Avoid false positive with async for loops (SIM113) (#9996)
  • [flake8-trio] Respect async with in timeout-without-await (#9859)
  • [perflint] Catch a wider range of mutations in PERF101 (#9955)
  • [pycodestyle] Fix E30X panics on blank lines with trailing white spaces (#9907)
  • [pydocstyle] Allow using parameters as a subsection header (D405) (#9894)
  • [pydocstyle] Fix blank-line docstring rules for module-level docstrings (#9878)
  • [pylint] Accept 0.0 and 1.0 as common magic values (PLR2004) (#9964)
  • [pylint] Avoid suggesting set rewrites for non-hashable types (#9956)
  • [ruff] Avoid false negatives with string literals inside of method calls (RUF027) (#9865)
  • [ruff] Fix panic on with f-string detection (RUF027) (#9990)
  • [ruff] Ignore builtins when detecting missing f-strings (#9849)

Performance

  • Use memchr for string lexing (#9888)
  • Use memchr for tab-indentation detection (#9853)
  • Reduce Result<Tok, LexicalError> size by using Box<str> instead of String (#9885)
  • Reduce size of Expr from 80 to 64 bytes (#9900)
  • Improve trailing comma rule performance (#9867)
  • Remove unnecessary string cloning from the parser (#9884)