Ruff v0.16.0 Released: Default Rules Jump from 59 to 413, CI Pipelines Need Attention
Score
84本文披露 Ruff 默认规则的大幅扩展及具体迁移方法,对 Python 开发者有较高信息增量
结构清晰,包含具体统计数据、命令示例和 AI 集成案例,质量上乘
提供了可立即执行的一行命令和修复策略,对真实开发场景有直接帮助
文章发布于版本发布后两天,非常及时
来自知名技术博主 Simon Willison,长期维护多个 Python 项目,信源可靠
Base 93.5 × T2 Source weight ×0.9 = 84
Curation line 70Selected
Why selected
The content is detailed, providing specific upgrade methods, fix statistics, and AI integration examples, but primarily targets developers already familiar with Ruff.
AI commentary
「For Python developers, this is an unmissable update signal. The significant increase in Ruff's default rules means we can no longer ignore potential issues in our code, and AI fix tools can lower the upgrade cost. Notably, Astral (OpenAI) is deeply integrating AI coding capabilities with static analysis tools, which may become the norm in future engineering practices.」
Quick overview
Ruff v0.16.0 for Python linting has been released, enabling 413 rules by default (up from 59). It catches syntax errors, runtime errors, and many other issues automatically. The author ran it on three major projects (Datasette, sqlite-utils, LLM) and fixed thousands of issues. Developers are advised to use `uvx ruff@latest check .` to quickly scan their codebase, and leverage AI coding assistants like Codex or Claude Code for automated fixes. The update comes from Astral (part of OpenAI), marking a significant evolution in Python engineering practices.
- Default rules increased from 59 to 413, covering more severe errors
- Author used `ruff --fix --unsafe-fixes` to fix 1538 errors in bulk
- AI coding assistants (GPT-5.6, Claude Opus 5) were used to assist fixes
- Developers are recommended to check and update CI configurations immediately
Full text
Showing the source text; the full translation is being generated.
"ruff" dev dependency.
From Brent Westbrook's announcement post:
Ruff now enables 413 rules by default, up from 59 in previous versions.
Since Ruff's default rule set was last modified in v0.1.0, the number of rules in Ruff has grown from 708 to 968. Many of these rules catch severe issues, including syntax errors and immediate runtime errors but were not previously enabled by default. With the new rule set, Ruff will bring these issues and many others to your attention without any Ruff configuration.
Here's a one-liner for trying it on any Python project:
uvx ruff@latest check .
I ran the latest Ruff against my three biggest projects - Datasette, sqlite-utils, and LLM - and it found hundreds of minor issues that breached the new default rules.
All three projects have very comprehensive test suites, executed in CI against Python 3.10 through Python 3.14, so upgrades like this are pretty safe. The following command did the bulk of the upgrades:
uvx ruff@latest check . --fix --unsafe-fixes
Against sqlite-utils, that command reported:
Found 1618 errors (1538 fixed, 80 remaining).
As an illustrative example, here are three of the remaining issues. Ruff does a nice job of explaining each one:
DTZ005 `datetime.datetime.now()` called without a `tz` argument
--> tests/test_duplicate.py:17:10
|
15 | "datetime_col" TEXT)""")
16 | # Insert one row of mock data:
17 | dt = datetime.datetime.now()
| ^^^^^^^^^^^^^^^^^^^^^^^
18 | data = {
19 | "text_col": "Cleo",
|
help: Pass a `datetime.timezone` object to the `tz` parameter
BLE001 Do not catch blind exception: `Exception`
--> tests/test_plugins.py:16:12
|
14 | db.execute("select * from pragma_function_list()")
15 | return True
16 | except Exception:
| ^^^^^^^^^
17 | return False
18 | finally:
|
B018 Found useless attribute access. Either assign it to a variable or remove it.
--> tests/test_update.py:46:5
|
44 | def test_update_invalid_pk(fresh_db, pk, update_pk):
45 | table = fresh_db["table"]
46 | table.insert({"id1": 5, "id2": 3, "v": 1}, pk=pk).last_pk
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
47 | with pytest.raises(NotFoundError):
48 | table.update(update_pk, {"v": 2})
|
Unsurprisingly, given Astral's new home at OpenAI, this output provides everything a coding agent would need to fix the problems.
I had Codex (GPT-5.6 Sol high) upgrade LLM and sqlite-utils, and Claude Code (with Opus 5) upgrade Datasette.
Related items
92
FeaturedOpenRouter Launches Prompt Caching with Sticky Routing to Drastically Reduce Multi-Turn Costs
OpenRouter 推出提示缓存与粘性路由,大幅降低多轮对话成本
For developers making frequent AI API calls, this feature is a direct money-saver. Sticky routing guarantees cache hit rates, and session_id requires zero configuration—every OpenRouter user should try it immediately.
91
FeaturedChatGPT Work: An AI Agent That Takes Action Across Apps and Files
ChatGPT Work:可在跨应用和文件中执行操作的AI Agent
I think this is a key step for AI assistants moving from Q&A to execution. Especially noteworthy for professionals who need to automate complex workflows. ChatGPT Work could become a new paradigm for productivity tools.
90
FeaturedAnatomy of a Frontier Lab Agent Intrusion: A Technical Timeline of the July 2026 Incident
前沿实验室代理入侵事件技术时间线:2026年7月事件剖析
This technical timeline is a must-read for all AI security researchers and agent developers—it doesn't just describe one attack but sounds an alarm on the weak defense systems of agent architectures. For teams deploying autonomous agents, this is an essential disaster prevention manual.
90
FeaturedBetter Tools Made Copilot Code Review Worse? Here's How GitHub Improved It
更好的工具反而让Copilot代码审查更糟?GitHub这样改进
This blog post deserves close reading by all AI product engineers and ML practitioners—it breaks the intuition that 'more powerful tools = better AI' and instead emphasizes an engineering philosophy aligned with agent reasoning patterns. Especially important for teams optimizing code review or similar agent-based products.
88
FeaturedOpenRouter Launches Unified Multimodal API: Single Endpoint for Image, Video, Audio, Embeddings, and Transcription
OpenRouter 推出统一多模态 API:单端点支持图像、视频、音频、嵌入与转录
This news is worth attention from all developers building multimodal AI applications: OpenRouter's unified API solves the pain of model switching, especially for startups or rapid prototyping. If you're struggling with multiple API keys and SDKs, this interface could be the unified layer you need.
87
FeaturedAnthropic Launches Claude for Teachers: AI Tools Designed for Educators
Anthropic 推出 Claude for Teachers:面向教师的教育 AI 工具
This announcement is valuable for educators and AI industry watchers alike. Instead of a generic chatbot, Anthropic designed a safety-first tool specifically for teachers, demonstrating the right approach for AI vertical deployment: solving real pain points rather than showing off technology. The built-in guardrails also set a reference for other AI companies, especially when serving scenarios involving children or teenagers.
86
FeaturedOpenRouter Introduces New Auto Router: Model Routing Powered by Market Wisdom
OpenRouter发布全新Auto Router:用市场智慧优化模型路由
This update is worth attention for anyone using APIs to build AI apps. Instead of guessing or testing model selection, market data now does the heavy lifting. Though sparse on details, the direction is right, especially for teams relying on aggregated model services.
86
FeaturedClaude Code v2.1.211 Release: Multiple Fixes and Improvements
Claude Code v2.1.211 发布:多项修复与改进
As a developer who frequently uses Claude Code for automated coding, I'm particularly interested in the security fixes, especially the permission preview character bypass and auto mode overriding hook decisions—these directly affect the security boundaries during team collaboration. The improvement in background agent reporting also makes long-running tasks more reliable. I recommend all users upgrade as soon as possible.