0xPlaygrounds / 0xPlaygrounds/subgrounds

Syntax Sugar for `._select`

Đang mở Phù hợp với người mới
#32 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement good first issue
Ngôn ngữ chính
Python
Star
73
Fork
12
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
python
Lĩnh vực
api
Loại issue
Tính năng
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Đặc tả rõ ràng
Mức phù hợp với người mới
70/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.