This repository was archived by the owner on Mar 26, 2026. It is now read-only.
fix: only format samples if the directory exists#2466
Merged
Conversation
gkevinzheng
approved these changes
Oct 21, 2025
parthea
added a commit
to googleapis/google-cloud-python
that referenced
this pull request
Oct 21, 2025
1.28.3 is needed to resolve an issue where generation fails for libraries which don't contain samples. See https://github.com/googleapis/gapic-generator-python/releases/tag/v1.28.3 and googleapis/gapic-generator-python#2466 ``` Generation failed for google-apps-card google-apps-script-type google-cloud-alloydb-connectors google-cloud-appengine-logging google-cloud-bigquery-logging google-cloud-common google-cloud-iam-logging google-cloud-source-context google-geo-type google-maps-places google-shopping-type ``` The specific stack trace is ``` Broken 1 paths nox > black docs google samples tests noxfile.py setup.py Usage: black [OPTIONS] SRC ... Try 'black -h' for help. Error: Invalid value for 'SRC ...': Path 'samples' does not exist. nox > Command black docs google samples tests noxfile.py setup.py failed with exit code 2 ``` The reason that these libraries do not contain samples is that the APIs do not have any RPCs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#2438 adding formatting for generated samples. This change introduced an issue in 11 libraries which do not contain generated samples. See googleapis/google-cloud-python#14792 which mentions
The specific stack trace is
The reason that these libraries do not contain samples is that the APIs do not have any RPCs