Azure / Azure/azure-functions-python-library

Inconsistent naming get_json() in EventGridEvent and EventGridOutputEvent

未关闭
#159 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Python
星标
179
派生
79
平均合并
2 天 8 小时
30 天内合并 PR
2

描述

Both mentioned classes have methods called `get_json` which return the classes `__data` field. This seems odd for two reasons:

1. They don't actually return JSON but a dict (if the typing hints in `__init__` are correct). In any case this is a major source of confusion.
2. All other getters are implemented as properties. (So why not just do the same here?)

https://github.com/Azure/azure-functions-python-library/blob/44712a77ce6ba68065d1c16ed6015bb998ddfe48/azure/functions/_eventgrid.py#L33-L34

https://github.com/Azure/azure-functions-python-library/blob/44712a77ce6ba68065d1c16ed6015bb998ddfe48/azure/functions/_eventgrid.py#L86-L87

贡献指南

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

调研方向

从 azure/functions/_eventgrid.py 的第 33-34 行和第 86-87 行开始,然后将这些访问器与 EventGridEvent 和 EventGridOutputEvent 上的其他 getter 进行比较。统一解决命名和 property 行为,同时确认最终的 API 能够反映该值是 dict 而不是 JSON。

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

评估

技术栈
python
领域
backend-api-design, cloud
Issue 类型
重构
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

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