click_config_file
click_config_file copied to clipboard
Raise `click.BadParameter` if config contains unknown keys
Fixes #11
Before, any keys in the configuration file that did not match any parameters of the command would be silently ignored. This could lead to confusion with users if they accidentally mistyped a parameter in the configuration file.
Here, the configuration_callback
method is updated to cross-reference the keys in the configuration file with the names of the command's parameters. If any keys are not recognized a click.BadParameter
is raised indicating the unrecognized keys.