tarantool / tarantool/tarantool-python
Type hints and type check
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 108
- Fork
- 51
- Merge medio
- 1g 8h
- PR unite (30g)
- 1
Descrizione
Type hints is a modern Python way to provide type information (see typing mypy). PR https://github.com/tarantool/tarantool-python/pull/264 is the first one to potentially use type hints, but it would be nice to have it anywhere.
Type asserts is a more tricky question. For now there are some minor type checks and asserts in connector. Some may also be implemented in PR #264. But it is a big question if they should be use. It seems that there are both adepts of using (since it is a convenient concept) and forbidding to use (since it contradicts Python duck typing principle) it. For example, see this StackOverflow thread. One way or another, it would be good to at least have a consistency on this question.
Since now package is fully documented, it should be easy to implement type hints and asserts after one decide what approach we should stick to. But choosing the approach is the question.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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 leggendo PR #264 e i controlli di tipo e gli asserts esistenti di connector, quindi esamina la documentazione del package e i riferimenti collegati a typing e mypy. Il primo passo consiste nel decidere se aggiungere annotazioni di tipo e con quale coerenza usare i controlli di tipo a runtime o gli asserts; il lavoro sarà considerato completato quando l’approccio concordato sarà applicato all’intero package.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api, backend
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 25/100