AnswerDotAI / fastlite

A bit of extra usability for sqlite
https://answerdotai.github.io/fastlite/
Apache License 2.0
174 stars 14 forks source link

Patch brakes the argument order #33

Open astynax opened 1 month ago

astynax commented 1 month ago

Hi!

This particular patch provides a subset of the original arguments. I can live with that theoretically, but it also swaps the positions of pk_items and updates. It took some time to find why my .update(id, {"a": "b"}) was broken 🙈 And the fact than my IDE (PyCharm) shows me hints about the original method and "go to definition" also jumps to the old one, doesn't help with such cases.

I understand that that "@patch"ing stuff was made for the sake of nbdev and it works in live environments. But such quirks with incompatibly changed method signatures make using of FastHTML in a Starlett's typical "hot reload" workflow pretty uncomfortable 😩

Maybe You can consider to make the args "keyword-only"? This will make the patching more robust.