How important is the `@_dispatchable` decorator in networkx?
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 5.1k
- Fork
- 2.1k
- Merge medio
- 1g 19h
- PR unite (30g)
- 82
Descrizione
Can this decorator be removed?
One obvious advantage for having it is to mirror runtime. It has some disadvantages though:
- I can't for the life of me find a way to use it on overloaded functions. Indeed looking at the stubs, overloaded functions are stripped of this decorator
- VS Code with Pylance does not show the documentation of the function on hover only when the decorator is used
I find the overload case very important that it outweighs the benefits of matching runtime. I also think the editor hover issue compelling on its own but one could argue that this should be discussed with the Pylance team instead.
I wonder if we could just get rid of the decorator altogether. Am I missing other reasons for having the decorator?
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando gli usi del decoratore @_dispatchable in typeshed e confrontandoli con le funzioni sovraccaricate negli stub. Esamina la motivazione del rispecchiamento del runtime e il comportamento di hover di Pylance segnalato. Il lavoro è completo quando è stata presa una decisione sul mantenimento del decoratore e tale decisione è stata documentata o implementata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- developer-experience
- Tipo di issue
- Refactoring
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100