Clean up async docs and unify for future GAPIC async.#2638
Merged
daspecster merged 1 commit intogoogleapis:masterfrom Oct 29, 2016
Merged
Conversation
dhermes
reviewed
Oct 28, 2016
| @@ -123,8 +123,9 @@ def _update(self, response): | |||
| raw_results = response.get('response', {}).get('results', None) | |||
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
dhermes
reviewed
Oct 28, 2016
speech/google/cloud/speech/result.py
Outdated
| from google.cloud.speech.transcript import Transcript | ||
|
|
||
|
|
||
| class SpeechResult(object): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
14 tasks
dhermes
approved these changes
Oct 28, 2016
| results.append(Transcript.from_api_repr(result)) | ||
| for result in raw_results: | ||
| for alternative in result['alternatives']: | ||
| results.append(Transcript.from_api_repr(alternative)) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
speech/unit_tests/test_operation.py
Outdated
| self.assertEqual('123456789', operation.name) | ||
| self.assertTrue(operation.complete) | ||
|
|
||
| self.assertIsInstance(operation.results, list) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
7afb765 to
1c5ed57
Compare
3 tasks
richkadel
pushed a commit
to richkadel/google-cloud-python
that referenced
this pull request
May 6, 2017
…-operation-results Clean up async docs and unify for future GAPIC async.
atulep
pushed a commit
that referenced
this pull request
Apr 3, 2023
…-results Clean up async docs and unify for future GAPIC async.
atulep
pushed a commit
that referenced
this pull request
Apr 18, 2023
…-results Clean up async docs and unify for future GAPIC async.
parthea
pushed a commit
that referenced
this pull request
Oct 22, 2023
…-results Clean up async docs and unify for future GAPIC async.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
@dhermes mentioned this in a previous review.
This is correct and I also cleaned up the docs.
In my testing with async, I haven't gotten more than one alternative to show up, even whith
max_alternatives=2. So that's why there isn't two in the doc example.