-
Notifications
You must be signed in to change notification settings - Fork 95
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
CLICommandsLoader.create_command overrides the argument "arguments_loader" #219
Comments
Azure CLI core does support custom def default_arguments_loader():
...
def default_description_loader():
...
kwargs['arguments_loader'] = argument_loader or default_arguments_loader
kwargs['description_loader'] = description_loader or default_description_loader However, may I know the motivation to make |
Hello, I am just reporting what seems to be a bug or design flaw. If Azure CLI core support custom If this is in fact a bug I can make a PR if you wanted. |
Hello. Just following up on this. I am happy to fix that in knack but please let me know if this is a bug or just wrong documentation. The While I am aware Azure CLI core does not have this problem, |
Issue here:
knack/knack/commands.py
Line 265 in dc7b7d8
The whole command registration process suggests that it is possible to give a custom arguments loader when calling the
command
method in aCommandGroup
context. However, this parameter is overwritten with something else in theCLICommandsLoader.create_command
method making impossible to pass a customarguments_loader
.The same is true for the argument
description_loader
.What was the behavior expected here? Shouldn't the
arguments_loader
from kwargs supersede the default one?The text was updated successfully, but these errors were encountered: