-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Util} Add util module for version and rest #13783
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
Conversation
|
add to S171 |
# Conflicts: # src/azure-cli/azure/cli/command_modules/resource/_help.py
| # Licensed under the MIT License. See License.txt in the project root for license information. | ||
| # -------------------------------------------------------------------------------------------- | ||
|
|
||
| from __future__ import print_function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support Python 2.0+ anymore, right?
Do we still need from __future__ import print_function? print-as-a-function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! I simply migrated the code from src/azure-cli/azure/cli/command_modules/resource/custom.py. Removed.
zhoxing-ms
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| except ValueError: | ||
| logger.warning('Not a json response, outputting to stdout. For binary data ' | ||
| 'suggest use "--output-file" to write to a file') | ||
| print(r.text) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer to not use print() according to command guideline.
Description
Peel off
az versionandaz restfromresourcemodule. A new moduleutilis created. Thus they don't carry the burden ofazure-mgmt-resourceinitialization when running these commandsresourcecommand module when developing these commandsThis makes running and developing
az versionandaz restsignificantly faster.Testing Guide