strictyaml
strictyaml copied to clipboard
Incorrect error location reported
strictyaml version 0.4.1
import strictyaml as sy sy.load("1: a", sy.MapPattern(sy.Int(), sy.Int()))
YAMLValidationError: when expecting an integer
found non-integer
in "<unicode string>", line 1, column 1:
'1': a
^
One would expect "column 6" (i.e. the "a" character) being marked as an error location.
Yes, this is the result of the way I arranged the location handling - it could only really do lines - not columns. Since untangling that would be a hassle and because it reported a clear actionable error that was sufficient for my needs I left it in place. This does need to be fixed though.