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():