Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add type hints to examples/shopping_ads #956

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 2 commits into
base: main
Choose a base branch
from

Conversation

bobhancockg
Copy link
Contributor

This change adds type annotations to all Python files within the examples/shopping_ads directory.

Type hints were added for function arguments, return values, class attributes, and local variables to improve code clarity, maintainability, and enable static analysis.

This change adds type annotations to all Python files within the
examples/shopping_ads directory.

Type hints were added for function arguments, return values, class
attributes, and local variables to improve code clarity, maintainability,
and enable static analysis.
@bobhancockg bobhancockg requested a review from a team as a code owner May 24, 2025 13:48

print(
f"Created shopping product ad group ad '{ad_group_ad_resource_name}'."
)

# Note: Original code returns ad_group_resource_name.

Choose a reason for hiding this comment

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

Perhaps this comment is no longer relevant after the changes since nothing changed. I suggest removing it.

client, customer_id, campaign_resource_name
)

# Create a shopping product ad group ad.
# Note: The function add_shopping_product_ad_group_ad currently returns

Choose a reason for hiding this comment

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

Is this comment needed anymore?

@BenRKarl BenRKarl added the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Jun 5, 2025
@kokoro-team kokoro-team removed the kokoro:run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Jun 5, 2025
@BenRKarl BenRKarl added the kokoro:force-run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Jun 5, 2025
Changed import paths from google.ads.googleads.v17 to google.ads.googleads.v20 and updated GoogleAdsClient.load_from_storage to use version='v20'.
@kokoro-team kokoro-team removed the kokoro:force-run This label is required to run a kokoro presubmit if an external contributor sends a PR. label Jun 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants