-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Clean up async docs and unify for future GAPIC async. #2638
Clean up async docs and unify for future GAPIC async. #2638
Conversation
@@ -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.
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.
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.
@@ -46,10 +46,12 @@ def test_from_api_repr(self): | |||
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
…-operation-results Clean up async docs and unify for future GAPIC async.
…-results Clean up async docs and unify for future GAPIC async.
…-results Clean up async docs and unify for future GAPIC async.
…-results Clean up async docs and unify for future GAPIC async.
@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.