ioxiocom / firedantic

Database models for Firestore using Pydantic base models.
BSD 3-Clause "New" or "Revised" License
43 stars 14 forks source link

improve the typehint of model.find, to catch a typo where a param is a set instead of dict #48

Open antont opened 10 months ago

antont commented 10 months ago

Had a bug with this kind of typo, it failed silently:

'id': {"==": my_id},
'some_value': {">=", condition_value} #has , instead of :

This makes the linter catch it.

I guess it could be caught and reported at runtime too, additionally.