CodeForPhilly / CodeForPhilly/stately

context.events should use dot notation

未关闭
#42 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
api
主要语言
Python
星标
22
派生
5
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

调研方向

未指定文件、测试或入口点。首先追踪 context.events 的构造和使用方式,然后找出现有的事件访问测试;支持所示的点号表示法示例,同时不破坏当前的字典式访问,即视为完成。

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

评估

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

把新 issue 发到你的邮箱

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