Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise click.BadParameter if config contains unknown keys #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sphuber
Copy link

@sphuber sphuber commented Mar 22, 2023

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

warn when providing unsupported options in the config file?
1 participant