AllenCell / AllenCell/allencell-segmenter-ml
returns optional pattern
未关闭
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 还没有评估数据。