Skip to content

fix(retail): add region tag for Python - Update import_products_inline_source.py #13463

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

# Import products into a catalog from inline source using Retail API
#
# [START retail_import_products_from_inline_source]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Consider moving this start tag to just before the import_products_from_inline_source function definition (around line 125) to highlight the core logic of the sample. This will create a more concise and readable snippet for the tutorial.

import random
import string
import time
Expand Down Expand Up @@ -143,3 +144,4 @@ def import_products_from_inline_source():


import_products_from_inline_source()
# [END retail_import_products_from_inline_source]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

To align with the suggestion for the start tag, this end tag should be moved to immediately follow the import_products_from_inline_source function definition (on line 146). This will ensure the region tag correctly encapsulates only the main function, creating a more focused code snippet for the tutorial.