Skip to content

Commit

Permalink
chore(python): use black==22.3.0 (GoogleCloudPlatform#172)
Browse files Browse the repository at this point in the history
Source-Link: googleapis/synthtool@6fab84a
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and Avani-Thakker-Crest committed Apr 14, 2023
1 parent 3009804 commit 7c09174
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions media-translation/snippets/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# WARNING - WARNING - WARNING - WARNING - WARNING
# WARNING - WARNING - WARNING - WARNING - WARNING

BLACK_VERSION = "black==19.10b0"
BLACK_VERSION = "black==22.3.0"

# Copy `noxfile_config.py` to your directory and modify it instead.

Expand Down Expand Up @@ -253,7 +253,7 @@ def py(session: nox.sessions.Session) -> None:


def _get_repo_root() -> Optional[str]:
""" Returns the root folder of the project. """
"""Returns the root folder of the project."""
# Get root of this repository. Assume we don't have directories nested deeper than 10 items.
p = Path(os.getcwd())
for i in range(10):
Expand Down
4 changes: 2 additions & 2 deletions media-translation/snippets/translate_from_mic.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ def listen_print_loop(responses):
# END_OF_SINGLE_UTTERANCE event.
if response.speech_event_type == SpeechEventType.END_OF_SINGLE_UTTERANCE:

print(u"\nFinal translation: {0}".format(translation))
print("\nFinal translation: {0}".format(translation))
return 0

result = response.result
translation = result.text_translation_result.translation

print(u"\nPartial translation: {0}".format(translation))
print("\nPartial translation: {0}".format(translation))


def do_translation_loop():
Expand Down

0 comments on commit 7c09174

Please sign in to comment.