-
Notifications
You must be signed in to change notification settings - Fork 3k
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
The argument name in the deprecation warning message should use the format "--foo-bar" instead of "foo_bar" #24647
Comments
route to CXP team |
@bingosummer Thanks for bringing this up! Looks like that is how it is handled in the knack framework (this code here) but looks like if you use the Nonetheless, I believe showing the argument is not best for customers since that would just be confusing. @yonzhan @jiasli Could you share insights on why the default behavior is so? |
seems |
It is the designed behavior of knack to show if deprecate_info:
deprecate_info.target = deprecate_info.target or argument_dest To override the deprecate_info=c.deprecate(target='--enable-pod-security-policy') Here is an example from azure-cli/src/azure-cli/azure/cli/command_modules/resource/_params.py Lines 390 to 391 in 5b91300
Another example from azure-cli/src/azure-cli/azure/cli/command_modules/vm/_params.py Lines 209 to 210 in 93b5083
|
|
Related command
Extension name (the extension in question)
It's not an issue to a specific extension. It is a common issue.
Description of issue (in as much detail as possible)
I'm working a PR to deprecate the argument '--enable-pod-security-policy', and I get the message like below. The warning message should be "Argument '--enable-pod-security-policy' has been deprecated and will be removed in a future release.".
Argument 'enable_pod_security_policy'
is not good.The text was updated successfully, but these errors were encountered: