#pyright

洪 民憙 (Hong Minhee) :nonbinary:hongminhee@hollo.social
2025-12-27

With high-performance #Python type checkers like #Pyright, #Pyrefly, and #ty now available, what's the value proposition of #Mypy? Is it the reference implementation? Or does Mypy still have the most features? I'm not trying to knock Mypy, I'm genuinely asking because I don't know.

2025-12-18

I have been investigating this:
```Python
from numbers import Real
def positive(x: Real) -> bool:
return x > 0 # Type Check failed!
```

#PEP 484 said that one should use `float` instead, but this does not solve for other numerical types e.g. #GMP numbers or #NumPy numbers.

And I found some old threads like github.com/python/typing/issue
github.com/python/mypy/issues/
discuss.python.org/t/numeric-g
discuss.python.org/t/clarifyin

And it seems like none has make any real progress.

To my understanding, ABC should also provides a good protocol for typing, just like typeclasses in #Haskell.

#Python #Typing #MyPy #Pyright

N-gated Hacker Newsngate
2025-12-16

🚀🎉 Hold onto your keyboards, folks! has unleashed "ty," a lightning-fast , because, of course, we needed another one. Written in , because Python apparently wasn't fast enough for checking itself, "ty" is now in and ready to bravely enter a market already saturated with the likes of , , and other tools you didn't know you couldn't live without. 🌪️🔧
astral.sh/blog/ty

Peter Bittnerpeterbittner
2025-11-06

PyClean v3.4.0 released! Now with Pyright debris removal, cleanup of empty folders only, and git-clean integration to remove untracked files. Try it with or now! `uvx pyclean`. pypi.org/project/pyclean/

2025-08-22

All fun and games in #python land until black decides to reformat your #pyright type ignore pragmas 🙄

Judith van Stegerenjd7h@fosstodon.org
2025-06-04

TIL the overload() decorator for Python, for describing methods that support multiple different combinations of argument types. A great way to make your typechecker happy: it's much stricter and clearer than just combining multiple types with "|".

docs.python.org/3/library/typi

#python #types #typechecking #pyright

JavAlpsjavalps
2025-06-03

@feoh Yup. For me its way better than or .

2025-05-16

@seungjin ... #pyright bas the problems of JS : slow....

Python devs are waiting for #ty a rust type checker, built by astral, the ones who did #ruff and #UV

2025-05-16

@seungjin I write #python code every day, and type hints are a "syntactic sugar" and are not required at all from the interpreter point of view.

For large projects, it's useful to add hints to "follow" what you are doing, and type checkers like #pyright or #mypy can help to find some bugs, by example when calling a method with wrong parameters types.

It also help for the readability of the code.

2025-04-10

Our of the box, #pyright is "better" than #mypy . Less configuration and more strict!

2025-03-12

With Microsoft rewriting Typescript in Go (for a mere 10x performance win), the next target is hopefully #pyright, which is pretty much unusable currently due to its reliance on Node.

devblogs.microsoft.com/typescr

Arie van Deursen 🇪🇺🇳🇱avandeursen@mastodon.acm.org
2025-01-23

Survey on use of types in Python among around 1000 developers. 88% of respondents “Always” or “Often” use Types in their Python code.

Study conducted by Meta, JetBrains, and Microsoft, results on a Google dashboard.

engineering.fb.com/2024/12/09/

#python #mypy #pycharm #pyright

2025-01-01
2025-01-01

Does this #pyright error strike any other #Python peeps as wrong?

“Return type mismatch: base method returns type "Literal['']", override returns type "str""

It's giving me a type error when I override a method that returned a literal string with a string I construct. That doesn't make any sense.

Philipp :emacs: :nixos:pmidden@fosstodon.org
2024-12-17

To all #python users currently using #pyright as their language server: switch to basedpyright. If only for import completion.

Kushal Das :python: :tor: 🇸🇪kushal@toots.dgplug.org
2024-12-03

github.com/sbdchd/django-types contains a lot of interesting things which one should do for proper #type #checking on #django projects. #pyright #basedpyright #python

Salar Rahmanian :verified: :scala: :swift: :nix:softinio@social.softinio.com
2024-08-31

Dear #python :python: Community,

I use #neovim, what’s the ideal setup for #lsp to include type checking these days? #ruff #pyright

2024-07-10

Вийшла нова версія #pyright

> Added experimental support for multithreaded type checking in CLI. You can now specify `--threads` followed by an optional thread count. 

```
> time pnpm dlx pyright@latest --level error
49.19s user 1.73s system 135% cpu 37.592 total

> time pnpm dlx pyright@latest --level error --threads
314.00s user 12.80s system 1380% cpu 23.672 total
```

#python

2024-06-02

If `pyright --verifytypes yourapp` cannot find `py.typed` marker for your package, you probably need to set PYTHONPATH="." (or "src", to a pathc where your module is located).

#python #pyright

2024-05-31

Well, after way too much fiddling, switched back to #pyright because the overall experience was most fluent... I'd love to know how to get "proper" autocompletion, though.

Say I want to use `pathlib.Path`, and start writing `dir = Pat` - what's needed to get an autocompletion for `Path` that auto-imports `from pathlib import Path`?

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst