From 7c09174e803f90dc4557dea32ba7446cecbf4a19 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 28 Mar 2022 19:54:16 -0400 Subject: [PATCH] chore(python): use black==22.3.0 (#172) Source-Link: https://github.com/googleapis/synthtool/commit/6fab84af09f2cf89a031fd8671d1def6b2931b11 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe Co-authored-by: Owl Bot --- media-translation/snippets/noxfile.py | 4 ++-- media-translation/snippets/translate_from_mic.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/media-translation/snippets/noxfile.py b/media-translation/snippets/noxfile.py index 85f5836dba3a..25f87a215d4c 100644 --- a/media-translation/snippets/noxfile.py +++ b/media-translation/snippets/noxfile.py @@ -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. @@ -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): diff --git a/media-translation/snippets/translate_from_mic.py b/media-translation/snippets/translate_from_mic.py index 59904047eb05..a05d4292a51d 100644 --- a/media-translation/snippets/translate_from_mic.py +++ b/media-translation/snippets/translate_from_mic.py @@ -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():