clikt
clikt copied to clipboard
add value source location property
allowing more useful help messages upon transform failure.
implementation of https://github.com/ajalt/clikt/issues/619
- add location property to ValueSource.Invocation
- add location to MapValueSource invocations.
- add location to JsonValueSource invocations.
i think the ability to construct the location string lazily would be useful, as it's only used for the unhappy path of parsing and could potentially require more complex computation for some value sources. i havent implemented this functionality here because it would require OptionInvocation and OptionCallTransformContext to also allow lazy name properties which may have backwards compatibility concerns. i can have a crack at that additional work if it would be useful.