#Pyright

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

🔷🔶🔷 Chris is. 🔶🔷🔶offby1@wandering.shop
2025-01-01
🔷🔶🔷 Chris is. 🔶🔷🔶offby1@wandering.shop
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`?

2024-05-22

I just wanted to try #pyright to type-check my #python code, but alas NO.

Not only does it seem to require Node for some insane reason, it requires SSL certificates to even run at all?!

You literally can't run `pyright --version` without it trying to create some sort of SSL object.

Like.. WTF?! What are we even doing here?

2024-05-06

A guide on integrating #emacs + #python + #hatch using [mostly] builtin tooling and project local .dir-locals.el variables.

Specifically, this setup uses #Eglot + #pyright for live syntax checking, #pytest for code running, #MyPy for type-checking, and #IPython as the shell

Feedback would be welcome -- trying to get it robust + idiomatic.

jtmoulia.srht.site/guides/emac

[inactive account] DarkCat09darkcat09@sc.dc09.ru
2024-04-28
https://git.dc09.ru/DarkCat09/musicdlp/commit/d62b2699c5e0a0f98af012e8087b5a051a686fb5

"Politely ask Pyright to shut up"
"Вежливо попросил Pyright заткнуться"

#python #pyright
@ru
ricardo :mastodon:governa@fosstodon.org
2024-03-26

#Pyright: A Static Type Checker for #Python (Install + Use) :python:

linuxtldr.com/installing-pyrig

2024-02-28

@mykhaylo any good candidate article from the top of your head? my biggest success for now — #eglot uses python-ts-mode and #pyright, but only with system python, ignoring what I set pyrightconfig.json or when running emacs inside activated venv.

Client Info

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