Ruff author warns: setting MYPY speeds up type checking on Pydantic but collapses types to Mapping[str, Any]
charliermarsh · x · 2026-11-21
Charlie Marsh (Ruff/uv author, Astral founder) responded to a viral "discovery" that setting MYPY makes type checkers run faster on Pydantic codebases. He confirmed the trick works but stressed it's actually bad: that code path collapses all types into Mapping[str, Any], dropping essentially all type precision — so you shouldn't do it.
A non-obvious flag worth knowing about, paired with a clear warning about its cost.
Related event: Ruff Author Finds Pretending to Be Mypy Speeds Up Pydantic Type Checking(2 posts)→
More from coding & agent
- Dev builds daily X-digest Grok bot that auto-blocked 19 reply bots, heading to marketplace — petergyang · 2026-11-21
- DeepMind's Antigravity Robotics Plugin: 2 Prompts, ~20 Minutes to Command a Real FR3 Duo Arm — jackyliang42 · 2026-11-21
- Asking Astra 6.2 to Review Code Written by Opus 5.5 Yields Almost Nothing — rickasaurus · 2026-11-21
- Security & Web3 Firewall MCP Server Hits Official Registry: Detects Tool-Poisoning and Rug-Pull Drift — ezelech · 2026-11-21
- Artificial Analysis Launches Search API Benchmark Covering 26 Products Across 14 Providers — ArtificialAnlys · 2026-11-21
- Pydantic hacks Mypy detection: why type checkers crawl and how to fake your way to speed — charliermarsh · 2026-11-21