Add filename/fieldname to syntax errors for "keyframe" fields #797
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi there 👋
This is a small PR to add minimal position info when a syntax error is raised while parsing key frame params.
Example new output:
Error: ''(' was never closed (translation_x@frame#26, line 1)'. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of . Full error message is in your terminal/ cli.
instead of just:
Error: ''(' was never closed (, line 1)'. Check your schedules/ init values please. Also make sure you don't have a backwards slash in any of your PATHs - use / instead of . Full error message is in your terminal/ cli.
It also comes with minor refactoring to lower repetition in
animation_key_frames.py
Any comment welcome :)
Also, I was willing to do further cleanup in this part of the code, but IMHO it lacks some unit tests to avoid breaking changes.
Do you have unit tests in place ? If not, do you plan on adding some, and if so how ?
In any case, do you have test cases to share regarding keyframe parsing ?
Thanks for your work :)