microsoft/pyright
View on GitHub ↗ ★ 15,724 Python
Static Type Checker for Python
68 mentions on Hacker News by 62 people: 5 stories, 63 comments · first 2019-03-24 · latest 2025-12-22
20082026
-
1. https://docs.astral.sh/ty/ 2. https://github.com/microsoft/pyright 3. https://github.com/python-lsp/python-lsp-server 4. https://github.com/palantir/python-language-server
comment by guessmyname · 2025-12-22 · in Claude Code gets native LSP support -
https://github.com/microsoft/pyright/blob/main/docs/type-inf...
comment by kurtis_reed · 2025-12-17 · in Announcing the Beta release of ty -
…Pyright that it will warn against idiomatic Python (EAFP) in favour of non-idiomatic Python (LBYL): https://github.com/microsoft/pyright/issues/1739 https://docs.python.org/3/glossary.html#term-EAFP https://docs.python.org/3/glossary.html#t…
comment by JimDabell · 2025-10-14 · in Pyrefly: Python type checker and language server in Rust -
…current time of August 2025 when this was written. mypy - https://github.com/python/mypy Pyright - https://github.com/microsoft/pyright Pyrefly - https://github.com/facebook/pyrefly ty - https://github.com/astral-sh/ty
comment by froh · 2025-08-20 · in An Update on Pytype -
…bunch of type errors. I'd expect pyrefly and ty to be slightly different from each other. See also: https://github.com/microsoft/pyright/blob/main/docs/mypy-com... https://htmlpreview.github.io/?https://github.com/python/typ...
comment by maleldil · 2025-05-18 · in Pyrefly: A new type checker and IDE experience for Python -
…it compare to Pyright on the utility / performance curve? Pyright is mature and already very fast. https://github.com/microsoft/pyright
comment by mil22 · 2025-05-07 · in Ty: A fast Python type checker and language server -
…behaviour. So if you want to write idiomatic Python, you need to disable typechecking TypedDicts. — https://github.com/microsoft/pyright/issues/1739 Now if this were a linter then I would understand. But a type checker should not be…
comment by JimDabell · 2025-04-29 · in Pyrefly - A faster Python type checker written in Rust -
This is a good summary: https://github.com/microsoft/pyright/blob/main/docs/mypy-com... But without that, I always felt like I was actively fighting mypy. It seemed like it was written for a totally different language than Python. Compared…
comment by harrall · 2025-01-30 · in "We're building a new static type checker for Python" -
I think that https://github.com/microsoft/pyright/blob/main/docs/mypy-com... actually covers the majority of my gripes with mypy, the main issues I encounter with mypy are due to its lack of precision. It produces a lot of false positives…
comment by theLiminator · 2025-01-29 · in "We're building a new static type checker for Python" -
…shortcomings of MyPy, I strongly suggest reading pyright's documentation for how they compare: https://github.com/microsoft/pyright/blob/main/docs/mypy-com... Quoting the pertinent part: > Pyright was designed with performance in mind. It…
comment by arthur-st · 2025-01-29 · in "We're building a new static type checker for Python" -
We have it already: https://github.com/microsoft/pyright
comment by tylerlaprade · 2025-01-22 · in Ruff: Python linter and code formatter written in Rust -
…any benefit going up to pylance. Pyright is under the MIT license so it can be used for anything: https://github.com/microsoft/pyright/blob/main/LICENSE.txt
comment by craftkiller · 2024-12-17 · in Multilspy: Building a common LSP client handtuned for all Language servers -
…and CI for a while because mypy didn’t support PEP 695 until its 1.11 release in July. [0] -- https://github.com/microsoft/pyright [1] -- https://github.com/python/mypy
comment by wdroz · 2024-10-07 · in Python 3.13.0 Is Released -
…(Hindley-Milner?) than mypy. https://github.com/google/pytype https://github.com/google/pytype https://github.com/microsoft/pyright
comment by zeotroph · 2024-08-12 · in GIL Become Optional in Python 3.13 -
…(but still is somehow the main contributor to Pyright) the situation is even stranger to me. [1] https://github.com/microsoft/pyright/pull/7177#issuecomment-... (In case you are wondering, I do not have the time to maintain an independent…
comment by xaberus · 2024-02-18 · in Ask HN: Which Python type checker should I use? -
…say is that for all my code bases it is very fast after the first cold start. Comparison to mypy: https://github.com/microsoft/pyright/blob/main/docs/mypy-com...
comment by simicd · 2023-12-15 · in Oxlint – JavaScript linter written in Rust -
Have you checked out Pyright[1]? It's not one tool to rule then all, but it is nice and fast. [1] https://github.com/microsoft/pyright
comment by C-Saunders · 2023-12-15 · in Oxlint – JavaScript linter written in Rust -
…use pyright instead[0]. It is the FOSS version of pyright, but having some features missing. [0]: https://github.com/microsoft/pyright
comment by maxloh · 2023-09-04 · in VSCodium – Open-source binaries of VSCode -
…s://github.com/python/mypy/commit/6f0826a9c169c4f05bb893... [2] https://peps.python.org/pep-0484/ [3] https://github.com/microsoft/pyright/commit/1d91744b1f268fd0...
comment by Kwpolska · 2023-04-16 · in The different uses of Python type hints -
…that. I feel its strength is that it lets you add as much detail to the types as is convenient. [1] https://github.com/microsoft/pyright
comment by Hasnep · 2023-02-28 · in Python is two languages now -
The only one that's stuck with me is https://github.com/microsoft/pyright , mainly because I thought it was strange that Microsoft would publish something such a lackluster README. It's not the worst ever, but it lacks a clear sales pitch…
comment by czx4f4bd · 2023-01-04 · in 10x C++ Editor -
…not plan to support snippets on Pyright (but open to supporting it on Pylance, which is not OSS). https://github.com/microsoft/pyright/issues/924
comment by chaychoong · 2023-01-03 · in Pyright: Static Type Checker for Python -
This issue has some pointers: https://github.com/microsoft/pyright/discussions/3222
comment by tyingq · 2023-01-02 · in Pyright: Static Type Checker for Python -
From this comparison ( https://github.com/microsoft/pyright/blob/main/docs/mypy-com... ) it looks like Pyright fixes a load of issues that MyPy has. It also seems much closer to how TypeScript works (I have worked significantly more with…
comment by samwillis · 2023-01-02 · in Pyright: Static Type Checker for Python -
An important difference is that pyright doesn't support plug-ins. https://github.com/microsoft/pyright/issues/607 E.g. https://github.com/Shoobx/mypy-zope can't work with pyright
comment by Recursing · 2023-01-02 · in Pyright: Static Type Checker for Python -
…terms of things that are considered bugs in mypy, and things that are optional in mypy (via flags). https://github.com/microsoft/pyright/blob/main/docs/mypy-com... .
comment by eatonphil · 2023-01-02 · in Pyright: Static Type Checker for Python -
…PEPs faster than we do. [1] https://github.com/google/pytype/blob/main/docs/developers/i... [2] https://github.com/microsoft/pyright
comment by zem · 2022-09-01 · in Ruff – a fast Python Linter written in Rust -
Woah, Pyright is written in Node? And it has its own [parser]( https://github.com/microsoft/pyright/blob/b74be3b2cb2c5d35b9... )? That's really interesting. I wonder how it compares to Mypy on speed. > The main thing that eventually forced…
comment by charliermarsh · 2022-08-23 · in Using Mypy in Production -
…[3] https://github.com/pydantic/pydantic [4] https://peps.python.org/pep-0681/ [5] https://github.com/microsoft/pyright/blob/8a1932b/specs/data...
comment by tony · 2022-08-23 · in Using Mypy in Production -
…static typing is no better, but at least it allows you to turn it off when it's not worth it. [1]: https://github.com/microsoft/pyright [2]: https://github.com/python/mypy [3]: https://github.com/google/pytype [4]:…
comment by gilch · 2022-08-13 · in Erg: a statically typed language that is Python compatible -
…that seems decidedly not better is the 651 NPM dependencies [1] it apparently drags along. [1] https://github.com/microsoft/pyright/blob/main/package-lock....
comment by ptx · 2022-06-27 · in What's New in Python 3.11? -
…Pylance is proprietary but the core of it is the Pyright library which is completely open (see: https://github.com/microsoft/pyright ). It would be nice if they were more transparent about the differences between the two and why Pylance is…
comment by camdenreslink · 2022-06-16 · in Despite best efforts .NET is still not an open platform -
pyright is a command line program https://github.com/microsoft/pyright in my experience it's a far better type checker than mypy, which tends to silently not check things without you ever realising
comment by ossopite · 2022-04-22 · in Python’s “type hints” are a bit of a disappointment to me -
…shortcoming. [0] https://github.com/RussBaz/enforce [1] https://github.com/agronholm/typeguard [2] https://github.com/microsoft/pyright [3] https://pydantic-docs.helpmanual.io [4] https://github.com/tiangolo/fastapi [5]…
comment by davidatbu · 2022-04-22 · in Python’s “type hints” are a bit of a disappointment to me -
…important for, say, <1000 line scripts). I default to strict mode for stuff that’s not too dynamic. https://github.com/microsoft/pyright https://marketplace.visualstudio.com/items?itemName=ms-pytho...
comment by oefrha · 2022-04-22 · in Python’s “type hints” are a bit of a disappointment to me -
…seemingly because they don't understand the difference between a variable and a binding ( https://github.com/microsoft/pyright/discussions/2441 ). As for Pyre, last I checked it had a lot of false positives that Mypy doesn't. Besides all…
comment by hexane360 · 2022-03-10 · in First look: adding type annotations to JavaScript -
Not to be confused with https://github.com/microsoft/pyright and dozens more smaller projects.
comment by kortex · 2022-02-20 · in Pyrite – open-source video conferencing -
Not to be confused with https://github.com/microsoft/pyright
comment by ataylor32 · 2022-02-19 · in Pyrite – open-source video conferencing -
yes, check out https://github.com/microsoft/pyright/blob/main/specs/datacla...
comment by zem · 2022-01-06 · in Problems once solved by a metaclass can be solved by __init_subclass__ -
…as I know, most language plugins still use LSP, including Typescript/Javascript, Rust, and Go. [1] https://github.com/microsoft/pyright
comment by pitaj · 2021-11-26 · in Batteries included with Emacs (2020) -
Check out https://github.com/microsoft/pyright , it's pretty snappy if you don't mind some JS in your ecosystem.
comment by wbobeirne · 2021-11-10 · in Twelve Years of Go -
…python-language-server by MS - that one has been superseded by Pyright and is deprecated in Code. https://github.com/microsoft/pyright https://github.com/Microsoft/python-language-server The only(?) one not by MS is Jedi:…
comment by ReleaseCandidat · 2021-10-24 · in Can we trust Microsoft with open source? -
Thanks to the maintainer's great responsiveness, Pyright will implement such a warning soon: https://github.com/microsoft/pyright/issues/2308
comment by davidatbu · 2021-09-16 · in Python Anti-Pattern -
…disadvantages of breaking backward compatibility and the advantage of more intuitive semantics. [0] https://github.com/microsoft/pyright/discussions/2306#discus...
comment by davidatbu · 2021-09-16 · in Python Anti-Pattern -
…in default arguments, not mutable containers. I started a discussion in Pyright's repo here[0]. [0] https://github.com/microsoft/pyright/discussions/2306
comment by davidatbu · 2021-09-16 · in Python Anti-Pattern -
…They base it 90% on the open-source pyright library. Then the lock down all their own enhancements. https://github.com/microsoft/pyright This is why MIT isn't always the correct choice. GPL wouldn't hurt devs at all and would protect from…
comment by hajile · 2021-09-03 · in Web-based editor -
…already implemented in (open source) Pyright, and Pylance re-uses Pyright, so it gets that support. https://github.com/microsoft/pyright/blob/main/specs/datacla...
comment by tiangolo · 2021-08-25 · in SQLModel – SQL Databases in FastAPI