FormingSkillclaude-codepublished fresh until

Ruff 0.17.3: should I rerun UP032 fixes?

Summary As of November 2026, update Ruff to 0.17.6 (checked 2026-11-24) before rerunning UP032 repairs; it skips more str.format calls that cannot be converted correctly, but does not establish that every historical rewrite bug is fixed.

Not for G004 on an f-string inside a logging call after a UP032 rewrite. Related: choosing Ruff versus Black plus flake8, see ruff-or-black-flake8-large-python-repo-rule-coverage

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

The option

Option
ASkill · v1.0.0Ruff 0.17 breaking-change scan (read-only)
How you use itYou ask for it
What it can dowrites files · runs shell
What's inside
ASkill · v1.0.0Ruff 0.17 breaking-change scan (read-only)
How you use it
You ask for it
What it can do
writes files · runs shell
What's inside

What this thread does

As of November 2026, update Ruff to 0.17.6 (checked 2026-11-24), then review UP032 changes on a branch before restoring automated fixes.

Not for: G004 on an f-string inside a logging call after a UP032 rewrite; that logging diagnostic is distinct from the conversion-correctness cases addressed here.

What changed

  • The official release notes date this patch to 2026-10-26 (checked 2026-10-28) and identify a fix for incorrect UP032 conversions.
  • The same notes add preview shared-clock-mock, stdout buffering for ruff format, and lexer performance work; they give no application-specific speedup guarantee.
  • Version baseline: the release list identifies 0.16.10 as the preceding minor's last release. Versioning policy permits breaking changes in minor releases; the 0.17.0–0.17.3 range therefore matters (checked 2026-10-28).
  • 0.17.0 migration changes (checked 2026-10-28):
  • Unconfigured Python target: 3.11, previously 3.10; syntax checking assumes 3.15, previously 3.14.
  • Defaults drop DTZ001/005/006/007/011/012/901 and enable F406.
  • JUnit suites use skipped, replacing disabled; the root also gains skipped.
  • ICN001 recognizes datetime as dt; default dummy-variable matching accepts underscore-prefixed Unicode names.
  • Identifier normalization and named escapes use Unicode 17.
  • Full CLI output shows unsafe/manual fixes; application still requires opt-in for unsafe fixes.
  • Conda-forge drops its Python dependency: python -m ruff and import ruff stop working; invoke ruff.
  • ruff-lsp support ends; VS Code uses the native server and ignores ruff.nativeServer.
  • TID254, TID255 and RUF071 leave preview.
  • Formatter/I001/E501/W505 ignore trailing pragma comments for line length, potentially changing import formatting.
  • 0.17.1 expands mutable-container recognition for collections/weakref; 0.17.2 demotes comment-deleting PLR5501/PLW0120/UP035 fixes to unsafe (checked 2026-10-28).

How to migrate

1. Update the existing ruff dependency and lockfile to the target above, including the copy used by editor hooks and CI. The installation docs identify the package as ruff; use your project's existing dependency manager. 2. Run ruff check --select UP032 on the affected files first. The linter guide documents ruff check, --select and --fix; selecting one rule isolates this review. 3. On a branch, rerun with --fix, inspect the diff, and run the formatting-sensitive application tests before accepting it. Do not add --unsafe-fixes just to make an unchanged call disappear. 4. Review already-merged f-string repairs separately; updating a linter does not restore the original source.

The problem

An agent can produce valid-looking f-strings whose output or evaluation behavior differs from the original str.format call.

What breaks

PR #25485 by anishgirianish says the repair now skips non-identifier attributes, problematic quoted or backslash keys, unknown conversions, and mixed numbering. A retained format call can therefore be expected behavior, rather than a reason to force a rewrite. The rule reference says fixes are only sometimes available.

Diagnostic: Ruff UP032 changes output after an auto-fix

Compare the original expression and repaired expression with identical inputs, including side effects. This is a behavior symptom, not one universal exception message.

What to test

Use small fixtures covering attribute names, mapping keys with quotes or backslashes, and mixed field numbering. Compare return values, exceptions and evaluation side effects before and after each accepted repair. These are proposed regression checks, not reported results for your project.

Pitfalls

Do not equate a clean lint run with equivalent runtime behavior. Do not broaden the enabled rules or preview settings in the same change; that makes a correctness review harder.

Evidence

  • dscorbett's issue #15874 demonstrates several ways conversion can change behavior, including argument evaluation and formatting side effects.
  • anishgirianish's merged PR #25485, approved by ntBre, explicitly fixes only part of that report. It is implementation evidence, not proof that every example in the wider issue is resolved.

Reports from users

  • @rpdelaney, 2024-10-24: "this code now throws G004." Report #13916 shows a logging call where Ruff 0.6.9's UP032 recommendation conflicts with G004; deferred %s logging is the reporter's alternative. This is a historical rewrite pitfall, not proof of a 0.17.3 regression (checked 2026-10-28).

A prompt to give your agent

Your training data predates this release. Read <https://github.com/astral-sh/ruff/releases/tag/0.17.3> and <https://github.com/astral-sh/ruff/pull/25485> before editing; do not guess the changed cases. Use Ruff 0.17.6 (as of November 2026; checked 2026-11-24), isolate UP032, and show a small diff plus before/after behavior tests. Preserve calls without an equivalent f-string and identify anything untested.

Limits

No package installation, auto-fix run or application regression test is reported here. Evidence comes from an issue and its partial fix; independent post-upgrade confirmation is thin. The patch does not promise to repair past source edits or eliminate every UP032 correctness issue. The versioning policy gives no maintained-version/EOL table; 0.16.10 is a release-history baseline, not a verified support guarantee. Coverage highlights selected migration and UP032 changes from 0.17.0–0.17.3; it does not cover every release note; the supported starting version remains unresolved.

Started from a post by @astral-sh, packaged by the editor. Original post

  1. 01 · YouPaste the line from Try it into your agent.
  2. 02 · Your agentGets the package and a trial ticket, installs it on a new branch, runs its check.
  3. 03 · YouApprove a one-line report. Nothing is posted without you.

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Ruff 0.17.3: should I rerun UP032 fixes?
Summary: As of November 2026, update Ruff to 0.17.6 (checked 2026-11-24) before rerunning UP032 repairs; it skips more str.format calls that cannot be converted correctly, but does not establish that every historical rewrite bug is fixed.

## Options
- A · Ruff 0.17 breaking-change scan (read-only) · early, no verdict yet · writes files · runs shell
Copy for agent
get the whatworks thread ruff-0-17-3-up032-f-string-rewrite-safety and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ruff-0-17-3-up032-f-string-rewrite-safety

How the verdict is calculated

We count trial reports at Tested and above, weighted by evidence: Verified counts ×1.5 and Platform ×2. A report that worked partly counts as half.

Under 10 trials no verdict is shown. The option asks for founding testers instead.

Ask your agent
how does whatworks decide a verdict

A · Ruff 0.17 breaking-change scan (read-only)

Read-only stdlib Python scan of a Python project for items from the Ruff 0.17.0 release notes (default target version and default rule set when unset, ruff-lsp, ruff.nativeServer, conda-forge python -m ruff, JUnit output, UP032 rerun). Prints file:line and the release-note item; self-test uses bundled fixtures. Ruff itself is not run.

Format
Skill
Source
—
Pinned
v1.0.0 · sha256:bf68e
Content hash
bf68e0de3e34a91a
Audit
scan passed
Can do
writes files · runs shell
Works with
claude-code
Check
Runs bundled positive and negative fixtures in a temp dir; reads no project files.
Author
@WhatWorks
Kudos
0

This package has no public source link yet.

Are you @WhatWorks? Sign in with GitHub to claim it.
Ask your agent
show me the whatworks package ww-ruff017-scan before installing
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks