{"slug": "mypy", "name": "mypy", "category": "other", "category_name": "Other software", "description": "", "recommenders": 3, "commenters": 7, "warners": 1, "score": 2.9, "rising": 1.67, "first": "2025-11-30", "latest": "2026-10-27", "why": "The one thing that did change anything was giving the agent a type checker. It ran mypy on nearly every change, and no type errors got through.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 3, "compare": 0, "warn": 1}, "spark": [0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 2], "listed": true, "loved": [], "caveat": "", "short_quote": "The one thing that did change anything was giving the agent a type checker. It ran mypy on nearly every change, and no type errors got through.", "icon": true, "domain": null, "github_repo": null, "official_url": "https://mypy-lang.org", "pricing": "", "aliases": ["mypy", "Mypy", "MyPy"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 804120050, "item_id": 50257503, "url": "https://news.ycombinator.com/item?id=50257503", "by": "b1z0n", "date": "2026-10-27", "stance": "recommend", "quote": "The one thing that did change anything was giving the agent a type checker. It ran mypy on nearly every change, and no type errors got through.", "excerpt": "OP here. I ran the same Python codebase with different levels of type hints through Claude Code and Codex, 766 runs in total. If you would rather not go the website and poke at mesmerizing interactive results there, spoiler alert below. I expected types to give the agent extra information, so it would be faster, use fewer tokens and be right more often. But it did nothing of that, no matter the types. Moreover, with ", "context": "", "use_case": "type checking for coding agents", "switched_from": "", "story": "Do Stronger Type Systems Make Coding Agents Better?"}, {"id": 802789090, "item_id": 50174318, "url": "https://news.ycombinator.com/item?id=50174318", "by": "throwaway219450", "date": "2026-10-20", "stance": "recommend", "quote": "it is helpful to make them run ruff and mypy to keep them honest", "excerpt": "I was talking about a function with 100 lines and no line breaks. Very difficult to read. I use black/ruff on a lot of projects and it will only touch standard-y things like docstring spacing, or spacing between methods and classes, import sorting etc. It doesn\u2019t touch intentional/aesthetic user spacing. With agents it is helpful to make them run ruff and mypy to keep them honest, but as long as the code adheres to t", "context": "", "use_case": "type checking agent code", "switched_from": "", "story": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful"}, {"id": 781922736, "item_id": 48870171, "url": "https://news.ycombinator.com/item?id=48870171", "by": "tpoacher", "date": "2026-07-11", "stance": "recommend", "quote": "typing+mypy/mypyc goes a very long way", "excerpt": "> Now there is a third place: code generation time. The model can often avoid the mistake before the compiler ever sees the code. This is doing a lot of heavy lifting here. How do you even know a mistake has been \"avoided\", and safely, for that matter? The kinds of mistakes the AI will miss are the worst kind: subtle logical mistakes, buried inconspicuously within boilerplate code, hard to detect or reason about, unt", "context": "", "use_case": "Python type checking", "switched_from": "", "story": "Scarf has moved away from Haskell"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 737627220, "item_id": 46101701, "url": "https://news.ycombinator.com/item?id=46101701", "by": "bbor", "date": "2025-11-30", "stance": "warn", "quote": "the MyPy LSP ecosystem is somewhere between crumbling and deprecated at this point", "excerpt": "Over the past few months, I've switched a few decently-sized python codebases from MyPy (which I used for years) to PyreFly (because the MyPy LSP ecosystem is somewhere between crumbling and deprecated at this point), and finally to Ty after it left beta this week. I'm now running a fully Astral-ized (rust-ized!) setup: 1. packaging with uv (instead of pip or poetry), 2. type checking with ty (instead of the default ", "context": "", "use_case": "Python type checking", "switched_from": "", "story": "Ty \u2013 A fast Python type checker, written in Rust"}]}], "who": [{"by": "shrumm", "context": "uses Pydantic heavily on large Python codebase", "url": "https://news.ycombinator.com/item?id=46296028", "date": "2025-12-16"}], "tags": [], "use_cases": ["python type checking", "type checking", "type checking for coding agents", "type checking agent code"], "compared": [{"slug": "pyrefly", "name": "Pyrefly", "co": 1, "switched_from": 0, "switched_to": 1}, {"slug": "ruff", "name": "Ruff", "co": 3, "switched_from": 0, "switched_to": 0}, {"slug": "uv", "name": "uv", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "pydantic", "name": "Pydantic", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "black", "name": "Black", "co": 2, "switched_from": 0, "switched_to": 0}, {"slug": "ty", "name": "ty", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=50257374", "title": "Do Stronger Type Systems Make Coding Agents Better?", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=50108717", "title": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48859673", "title": "Scarf has moved away from Haskell", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48444442", "title": "Are you expected to run five Python type-checkers now?", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47991802", "title": "A Couple Million Lines of Haskell: Production Engineering at Mercury", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46294289", "title": "Announcing the Beta release of ty", "mentions": 1}], "sentiment_by_month": {"2025-11": {"warn": 1}, "2025-12": {"neutral": 1}, "2026-01": {}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {"neutral": 1}, "2026-06": {"neutral": 1}, "2026-07": {"recommend": 1}, "2026-08": {}, "2026-09": {}, "2026-10": {"recommend": 2}}, "quotes": [{"id": 804120050, "item_id": 50257503, "url": "https://news.ycombinator.com/item?id=50257503", "by": "b1z0n", "date": "2026-10-27", "stance": "recommend", "quote": "The one thing that did change anything was giving the agent a type checker. It ran mypy on nearly every change, and no type errors got through.", "excerpt": "OP here. I ran the same Python codebase with different levels of type hints through Claude Code and Codex, 766 runs in total. If you would rather not go the website and poke at mesmerizing interactive results there, spoiler alert below. I expected types to give the agent extra information, so it would be faster, use fewer tokens and be right more often. But it did nothing of that, no matter the types. Moreover, with ", "context": "", "use_case": "type checking for coding agents", "switched_from": "", "story": "Do Stronger Type Systems Make Coding Agents Better?"}, {"id": 802789090, "item_id": 50174318, "url": "https://news.ycombinator.com/item?id=50174318", "by": "throwaway219450", "date": "2026-10-20", "stance": "recommend", "quote": "it is helpful to make them run ruff and mypy to keep them honest", "excerpt": "I was talking about a function with 100 lines and no line breaks. Very difficult to read. I use black/ruff on a lot of projects and it will only touch standard-y things like docstring spacing, or spacing between methods and classes, import sorting etc. It doesn\u2019t touch intentional/aesthetic user spacing. With agents it is helpful to make them run ruff and mypy to keep them honest, but as long as the code adheres to t", "context": "", "use_case": "type checking agent code", "switched_from": "", "story": "SlopCodeBench 10/2026 \u2013 Opus 5.5, Astra wins overall, xhigh considered harmful"}, {"id": 781922736, "item_id": 48870171, "url": "https://news.ycombinator.com/item?id=48870171", "by": "tpoacher", "date": "2026-07-11", "stance": "recommend", "quote": "typing+mypy/mypyc goes a very long way", "excerpt": "> Now there is a third place: code generation time. The model can often avoid the mistake before the compiler ever sees the code. This is doing a lot of heavy lifting here. How do you even know a mistake has been \"avoided\", and safely, for that matter? The kinds of mistakes the AI will miss are the worst kind: subtle logical mistakes, buried inconspicuously within boilerplate code, hard to detect or reason about, unt", "context": "", "use_case": "Python type checking", "switched_from": "", "story": "Scarf has moved away from Haskell"}, {"id": 775399569, "item_id": 48462473, "url": "https://news.ycombinator.com/item?id=48462473", "by": "emeryberger", "date": "2026-06-09", "stance": "neutral", "quote": "lets a type checker like mypy catch type mismatches in your code", "excerpt": "Since we are talking about Python type-checkers: we've built a (non-AI based) type assistant for Python called RightTyper (https://github.com/RightTyper/RightTyper). Below is a brief description; a technical paper describing RightTyper is here: https://arxiv.org/abs/2507.16051, \"Getting Python Types Right with RightTyper\" RightTyper is a Python tool that automatically generates type annotations for your code. It moni", "context": "", "use_case": "type checking", "switched_from": "", "story": "Are you expected to run five Python type-checkers now?"}, {"id": 767943329, "item_id": 47996458, "url": "https://news.ycombinator.com/item?id=47996458", "by": "germandiago", "date": "2026-05-03", "stance": "neutral", "quote": "Currently I use Python with Mypy.", "excerpt": "I am currently reading Real-World Ocaml and I am really learning more about functional programming, though I was already familiar with a few things. Looks to me like you can build amazingly robust pieces of software with functional programming. However, I am divided. I have a backend that works in NiceGUI for a product. It does the job. The code is reasonable and MVVM. The most important task it does is connecting to", "context": "", "use_case": "type checking", "switched_from": "", "story": "A Couple Million Lines of Haskell: Production Engineering at Mercury"}, {"id": 740736449, "item_id": 46296028, "url": "https://news.ycombinator.com/item?id=46296028", "by": "shrumm", "date": "2025-12-16", "stance": "neutral", "quote": "We run both Pyright and Mypy... they catch different errors so we've kept both, but it feels redundant.", "excerpt": "Thanks Astral team! We use Pydantic heavily, and it looks like first class support from Ty is slated for the stable release, we'd love to try it. While we wait... what's everyone's type checking setup? We run both Pyright and Mypy... they catch different errors so we've kept both, but it feels redundant. https://htmlpreview.github.io/?https://github.com/python/typing/blob/main/conformance/results/results.html suggest", "context": "uses Pydantic heavily on large Python codebase", "use_case": "Python type checking", "switched_from": "", "story": "Announcing the Beta release of ty"}, {"id": 737627220, "item_id": 46101701, "url": "https://news.ycombinator.com/item?id=46101701", "by": "bbor", "date": "2025-11-30", "stance": "warn", "quote": "the MyPy LSP ecosystem is somewhere between crumbling and deprecated at this point", "excerpt": "Over the past few months, I've switched a few decently-sized python codebases from MyPy (which I used for years) to PyreFly (because the MyPy LSP ecosystem is somewhere between crumbling and deprecated at this point), and finally to Ty after it left beta this week. I'm now running a fully Astral-ized (rust-ized!) setup: 1. packaging with uv (instead of pip or poetry), 2. type checking with ty (instead of the default ", "context": "", "use_case": "Python type checking", "switched_from": "", "story": "Ty \u2013 A fast Python type checker, written in Rust"}]}