Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

Commit

Permalink
fix: correct region tag formatting (#102)
Browse files Browse the repository at this point in the history
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/python-compute/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [ ] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕
  • Loading branch information
Xmasreturns committed Aug 18, 2021
1 parent 2c5c91c commit 8339c00
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions samples/snippets/sample_pagination.py
Expand Up @@ -14,14 +14,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# [START compute_images_list_page ]
# [START compute_images_list ]
# [START compute_images_list_page]
# [START compute_images_list]
import google.cloud.compute_v1 as compute_v1
# [END compute_images_list ]
# [END compute_images_list_page ]
# [END compute_images_list]
# [END compute_images_list_page]


# [START compute_images_list ]
# [START compute_images_list]
def print_images_list(project: str) -> None:
"""
Prints a list of all non-deprecated image names available in given project.
Expand All @@ -42,10 +42,10 @@ def print_images_list(project: str) -> None:
# requests to the API for you, so you can simply iterate over all the images.
for img in images_client.list(request=images_list_request):
print(f" - {img.name}")
# [END compute_images_list ]
# [END compute_images_list]


# [START compute_images_list_page ]
# [START compute_images_list_page]
def print_images_list_by_page(project: str, page_size: int = 10) -> None:
"""
Prints a list of all non-deprecated image names available in a given project,
Expand All @@ -70,7 +70,7 @@ def print_images_list_by_page(project: str, page_size: int = 10) -> None:
print(f"Page {page_num}: ")
for img in page.items:
print(f" - {img.name}")
# [END compute_images_list_page ]
# [END compute_images_list_page]


if __name__ == '__main__':
Expand Down

0 comments on commit 8339c00

Please sign in to comment.