AllenCell / AllenCell/allencell-segmenter-ml

returns optional pattern

Ouverte
#522 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
refactor
Langage dominant
Python
Étoiles
5
Forks
3
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.