AllenCell / AllenCell/allencell-segmenter-ml
returns optional pattern
Aperta
refactor
- Lingua principale
- Python
- Stelle
- 5
- Fork
- 3
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Valutazione
Questa issue non è ancora stata valutata.