Derive "param_hint" in errors from param itself
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Rather than trying to apply the same logic to all param types, trying to extract a meaningful value from Parameter.opts even for Arguments, make this a function computed against the Parameter itself. Then, when it's time to specialize it to use the metavar for Arguments, we just need to override the function. Also unify a small amount of logic being shared among exception classes. Fully backwards compatible, except for the change to error text on Arguments, which is the intended effect. Fixes #704, #598
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
2 files+21 added−6 removed
- other:+21 added−6 removed