Conversation
|
Hey, @miili , thanks for the PR. The cleanup you did is something I appreciate and it is mergeable. Note the typing comments are relevant by today, but not when this script was started ;) . Let's leave them for a better day, actually I have some other ideas for this script in the future.
It was considered to pass the context around in the past, it was a bit cumbersome to deal with at the time, but we might reconsider it. Now to the point of this PR. The change of the message you did is a bit misleading. The reason why we check for invalid function is because
At first glance it makes sense we return To summarize, please remove the changes related to the delta exception and we can merge this PR. |
|
I made some changes to Returning a |
|
As I said, changing the |
Related to #570 #324.
I improved the
DeltaExceptionmessage to see what is going on and why the deltas fail erratically. I don't know QGIS Python well and wonder is there is anerror()method analog to thelayer.dataProdiver().error(). That could be helpful.Took the liberty and rename
delta_logtoDELTA_LOG, as it is a global variable which is being reused. The global state here is a dangerous thing. Maybe pass along a lightweight context and fill it with information.Other things I want to comment on:
TypedDict. Go fordataclasswhere possible or even pydantic if you need serialisation/deserialistion.%ssyntax instead.Literalinstead ofEnumwhere feasible.