0xPlaygrounds / 0xPlaygrounds/subgrounds
Syntax Sugar for `._select`
- Langage dominant
- Python
- Étoiles
- 73
- Forks
- 12
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
**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!
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- python
- Domaine
- api
- Type d'issue
- Fonctionnalité
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 70/100