0xPlaygrounds / 0xPlaygrounds/subgrounds

Syntax Sugar for `._select`

未关闭 适合新手
#32 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement good first issue
主要语言
Python
星标
73
派生
12
PR 合并指标
30 天内没有已合并 PR

描述

**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!

贡献指南

打开贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api
Issue 类型
功能
难度
2/5
预计耗时
1-3 小时
活跃度
停滞
描述清晰度
描述清楚
新手友好度
70/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。