forked from pallets/click
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Derive "param_hint" in errors from param itself
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 pallets#704, pallets#598
- Loading branch information
Showing
2 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters