Ruff's Hidden Feature: Auto-rewrite Python to Idiomatic Code
tdhopper · x · 2026-08-20
Ruff linter has ported 36 rules from refurb into the FURB category, all shipping with auto-fixes. These rules target non-idiomatic Python patterns:
- Set-add loops: Rewrites for x in items: s.add(x) to s.update(items) for clarity and efficiency.
- Manual prefix/suffix slicing: Replaces complex conditional slices with Python 3.9+ removeprefix() and removesuffix() methods, eliminating off-by-one bugs.
These rules are opt-in by default.
More from coding & agent
- Claude Managed Agents update: Self-Hosted Sandboxes can now save work to memory — EricBuess · 2026-08-20
- Daily Reading: Enterprise Agent Failures Double, Doc-Driven Development — rseroter · 2026-08-20
- On-device continual learning with Online-SDFT self-distillation — burny_tech · 2026-08-20
- Cass tool offers local backup and search for agent sessions — doodlestein · 2026-08-20
- Disaggregated Compute: Faster Inference via Split Prefill and Decode — toptickcrypto · 2026-08-20
- Slack is an under-appreciated environment for AI agent collaboration — msrivastav13 · 2026-08-20