AllenCell / AllenCell/allencell-segmenter-ml

returns optional pattern

オープン
#522 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
refactor
主要言語
Python
スター
5
フォーク
3
PR マージ指標
30日以内にマージされた PR はありません

説明

Our practice of doing null checks on fields returned by getters whose value can be null (in order to satify `mypy` linter) really feels like an anti pattern, especially when we handle null values by throwing an error

https://github.com/AllenCell/allencell-segmenter-ml/pull/519#discussion_r1779307204

Could the error just be thrown internal to the getter, for violating an invariant?

We need research into how type checking in Python should be done.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

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

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