CodeForPhilly / CodeForPhilly/stately

context.events should use dot notation

Đang mở
#42 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
api
Ngôn ngữ chính
Python
Star
22
Fork
5
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Ideally we'd be able to do something like this:

``` python
event_names = [event.action.name for event in events]
if 'Approve Taxes' in event_names and 'Approve Parking' in event_names:
change_state('Approved')
```

But currently we have to use:

``` python
event_names = [event['action']['name'] for event in events]
```

Not a huge deal, just easier to write.
Related to #20

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

No file, test, or entry point is named. Start by tracing how context.events is constructed and consumed, then identify the existing tests for event access; done means supporting the shown dot-notation example without breaking current dictionary-style access.

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
backend
Loại issue
Tính năng
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/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.