From ee115582b760bdd7b80ad2cb2622b1a309a19743 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 30 Jun 2020 18:18:06 -0700 Subject: [PATCH] chore: fix docstring replace (#38) This PR was generated using Autosynth. :rainbow: Synth log will be available here: https://source.cloud.google.com/results/invocations/1deda303-9d5e-4b48-a4b5-1bc8f66830f9/targets - [ ] To automatically regenerate this PR, check this box. --- .../cloud/speech_v1p1beta1/proto/resource_pb2.py | 3 +-- .../google-cloud-python-speech/synth.metadata | 2 +- packages/google-cloud-python-speech/synth.py | 15 +++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/proto/resource_pb2.py b/packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/proto/resource_pb2.py index 68e825886584..701d9b569fb5 100644 --- a/packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/proto/resource_pb2.py +++ b/packages/google-cloud-python-speech/google/cloud/speech_v1p1beta1/proto/resource_pb2.py @@ -421,8 +421,7 @@ in january”, “i was born in febuary”, …), use the pre-built ``$MONTH`` class improves the likelihood of correctly transcribing audio that includes months (e.g. "i was born in :math:`month"). To refer to pre- - built classes, use the class' symbol prepended with ``\ ``e.g.``\$MONTH\ ``. - To refer to custom classes that were defined inline in the + built classes, use the class' symbol prepended with ``\ ``e.g.``\$MONTH\ ``. To refer to custom classes that were defined inline in the request, set the class's``\ custom_class_id\ ``to a string unique to all class resources and inline classes. Then use the class' id wrapped in $``\ {…}``e.g. "${my-months}". To refer to custom classes diff --git a/packages/google-cloud-python-speech/synth.metadata b/packages/google-cloud-python-speech/synth.metadata index 236239699f0a..fe9661140660 100644 --- a/packages/google-cloud-python-speech/synth.metadata +++ b/packages/google-cloud-python-speech/synth.metadata @@ -4,7 +4,7 @@ "git": { "name": ".", "remote": "https://github.com/googleapis/python-speech.git", - "sha": "0d4d2c20b131269e532436da0bf6cdabc7d398e8" + "sha": "e0fc3c74178ba36a3a054431b31afe8a34289c0c" } }, { diff --git a/packages/google-cloud-python-speech/synth.py b/packages/google-cloud-python-speech/synth.py index 649a25019d28..51670521e7d8 100644 --- a/packages/google-cloud-python-speech/synth.py +++ b/packages/google-cloud-python-speech/synth.py @@ -55,6 +55,21 @@ r"from google.cloud.speech_\1.gapic import speech_client as speech_\1", ) + +# Fix bad docstring +s.replace( + "google/**/resource_pb2.py", + """``\\\\ ``e\.g\.``\\\\ + \$MONTH\\\\ ``\.""", + """``\ ``e.g.``\$MONTH\ ``.""" +) + +s.replace( + "google/**/resource_pb2.py", + """\(e\.g\. ``\\\\ \{my- + months\}`\)\.""", + """(e.g. ``\ {my-months}``).""" +) # ---------------------------------------------------------------------------- # Add templated files # ----------------------------------------------------------------------------