AllenCell / AllenCell/allencell-segmenter-ml

returns optional pattern

Đang mở
#522 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
refactor
Ngôn ngữ chính
Python
Star
5
Fork
3
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.