0xPlaygrounds / 0xPlaygrounds/subgrounds
Syntax Sugar for `._select`
- Lingua principale
- Python
- Stelle
- 73
- Fork
- 12
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
**Is your feature request related to a problem? Please describe.**
`._select` is pretty verbose, especially when forced to use it with keywords like `"from"`
```py
subgraph.Query.snapshots._select("from")
```
**Describe the solution you'd like**
Use the `subscript` helpers for a cleaner syntax (and more intuitive)!
```py
subgraph.Query.snapshots["from"]
```
**Implementation checklist**
- [ ] Add `__setitem__` and `__getitem__`
- [ ] Add tests for those!
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Look at the `_select` method in the codebase, likely in a class like `Query` or `Field`. Implement `__getitem__` and `__setitem__` to allow subscript syntax. Write tests to ensure the new syntax works correctly, especially with reserved keywords like 'from'. Check existing tests for `_select` to understand the expected behavior.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- api
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 70/100