-
Notifications
You must be signed in to change notification settings - Fork 6.6k
docs(samples): Changing machine type sample #9042
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
Here is the summary of changes. You are about to add 1 region tag.
This comment is generated by snippet-bot.
|
compute/client_library/ingredients/instances/change_machine_type.py
Outdated
Show resolved
Hide resolved
compute/client_library/ingredients/instances/change_machine_type.py
Outdated
Show resolved
Hide resolved
compute/client_library/ingredients/instances/change_machine_type.py
Outdated
Show resolved
Hide resolved
compute/client_library/ingredients/instances/change_machine_type.py
Outdated
Show resolved
Hide resolved
|
||
|
||
# <INGREDIENT change_machine_type> | ||
def change_machine_type(project_id: str, zone: str, instance_name: str, new_machine_type: str) -> NoReturn: |
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.
Why not just None
? Is NoReturn
necessary?
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.
You are right, I'm using NoReturn
here incorrectly now that I checked the documentation. I'll fix this.
compute/client_library/ingredients/instances/change_machine_type.py
Outdated
Show resolved
Hide resolved
|
||
wait_for_extended_operation(operation, "changing machine type") | ||
|
||
return |
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.
Is the return necessary? (the code will work identical without the return)
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.
It's not necessary, it's my personal preference to put it there, like a period at the end of a sentence :D I'll remove it.
compute/client_library/snippets/instances/change_machine_type.py
Outdated
Show resolved
Hide resolved
compute/client_library/snippets/instances/change_machine_type.py
Outdated
Show resolved
Hide resolved
…pe.py Co-authored-by: Dan Lee <[email protected]>
* docs(samples): Changing machine type sample * Applying suggestions * Wording fix * Update compute/client_library/ingredients/instances/change_machine_type.py Co-authored-by: Dan Lee <[email protected]> * Applying suggestions --------- Co-authored-by: Karl Weinmeister <[email protected]> Co-authored-by: Dan Lee <[email protected]>
Description
Fixes #
Note: Before submitting a pull request, please open an issue for discussion if you are not associated with Google.
Checklist
nox -s py-3.9
(see Test Environment Setup)nox -s lint
(see Test Environment Setup)