Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

pyright support via dataclass transforms

Aperta
#795 27 commenti 4 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
python
Ambito
tooling

Direzione di ricerca

Start with pyright's specs/dataclass_transforms.md and the linked pyright PR 1773, then compare them with attrs' current decorator semantics. Clarify the intended next-generation decorator support and implementation scope with maintainers; done means an agreed, working integration that supports the relevant dataclass-transform recommendations.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Feature Typing

pyright is adding support for attrs classes in static type checking through a source-level extension mechanism called dataclass transforms. This will provide support the strict-subset of attrs class semantics implemented as standard-library dataclasses in pyright, and by extension pylance and VS Code.

Relevant project issues include:

https://github.com/microsoft/pyright/discussions/1782 - Discussion thread for feature
https://github.com/microsoft/pylance-release/issues/226 - pylance tracking issue.
https://github.com/microsoft/pyright/issues/146 - pyright ur-issue.
https://github.com/microsoft/pyright/pull/1773 - Initial PR
https://github.com/microsoft/pyright/blob/master/specs/dataclass_transforms.md - Current spec in master

Would y'all be open to a PR implemented the recommendations in the linked specification?
Perhaps there's a dialog to be had to ensure that the upcoming next-gen decorator semantics can be supported via this extension mechanism? (I don't have enough of the picture in mind to understand whether this is true.)

edit - Updating cross-refs I'd originally missed and rephrasing description. This connection had already been made!

Lingua principale
Python
Stelle
5.8k
Fork
490
Merge medio
1h 45m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di python-attrs/attrs

Tutte le issue di python-attrs/attrs

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.