ty statically resolves Pydantic v1/v2 version checks; mypy and Pyright still false-positive
charliermarsh · x · 2026-12-03
Charlie Marsh (Astral) showed off ty's reachability analysis: code branching on the Pydantic version to call modeldumpjson (v2) vs json() (v1) type checks even with Pydantic v1 installed, because ty statically evaluates the version check and marks the v2-only branch unreachable.
He notes that under the same setup mypy, Pyright, Pyrefly and Zuban all emit a false positive on line 13, and that the capability is general — not Pydantic-specific.
More from coding & agent
- UCLA and LMArena paper shows existing user simulator metrics miss many induced agent failures — lmarena-ai · 2026-12-03
- Vuln-hunting agent benchmark: 100 YOLO agents find 87.3% of bugs, frontier-coordinated team only 45.8% — dosco · 2026-12-03
- YC's Garry Tan: RSI is just researchers using Codex — with frontier models generations ahead, unreleased — garrytan · 2026-12-03
- Anthropic explains agent memory: 'dreaming' keeps the top of the hierarchy small — hugobowne · 2026-12-03
- Neon's refreshingly unique personality is a step-change over converged Claude and Codex — jxmnop · 2026-12-03
- Open-source Recall gateway flags and blocks destructive agent tool calls like DROP TABLE — digivated · 2026-12-03