Azure / Azure/azure-functions-python-library

Inconsistent naming get_json() in EventGridEvent and EventGridOutputEvent

オープン
#159 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
179
フォーク
79
平均マージ
2日 8時間
マージ済み PR(30日)
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 と比較してください。命名とプロパティの動作を一貫性のあるものに解決し、結果として得られる API が値が JSON ではなく dict であるかどうかを反映することを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
backend-api-design, cloud
issue の種類
リファクタリング
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。