monarch-initiative / koza

Data transformation framework for LinkML data models
https://koza.monarchinitiative.org/
BSD 3-Clause "New" or "Revised" License
48 stars 4 forks source link

What is the purpose of "is not None" in the the transform.py idiom? #157

Open ptgolden opened 3 weeks ago

ptgolden commented 3 weeks ago

The Koza documentation suggests iterating through rows in a transform by writing the code:

while (row := koza_app.get_row()) is not None:

What is the purpose of is not None here? get_row() never seems to return None, only the result of a source's reader. That return, as far as I can tell, is always Dict[str, Any] and never None. The is not None is not hurting anything, but seems unnecessary?