tarantool / tarantool/tarantool-python
Type hints and type check
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 108
- Forks
- 51
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 1
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit dem Lesen von PR #264 und den vorhandenen Typprüfungen und asserts für connector, und sieh dir anschließend die Paketdokumentation sowie die verlinkten Referenzen zu typing und mypy an. Als Erstes muss in diesem Issue entschieden werden, ob Typannotationen hinzugefügt werden sollen und wie konsistent Laufzeit-Typprüfungen oder asserts verwendet werden sollen; als abgeschlossen gilt die Arbeit, wenn der vereinbarte Ansatz im gesamten Paket angewendet wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- api, backend
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100