From d2cc36536d3ae6b1bd69cd196fd2a9d0b7e58fe2 Mon Sep 17 00:00:00 2001 From: Eric Schmidt Date: Wed, 9 Dec 2020 09:36:39 -0800 Subject: [PATCH] fix: moves import six inside of region tags (#83) --- translation/samples/snippets/snippets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translation/samples/snippets/snippets.py b/translation/samples/snippets/snippets.py index 41d64c32291d..5700969cef92 100644 --- a/translation/samples/snippets/snippets.py +++ b/translation/samples/snippets/snippets.py @@ -23,8 +23,6 @@ import argparse -import six - def detect_language(text): # [START translate_detect_language] @@ -84,6 +82,7 @@ def translate_text_with_model(target, text, model="nmt"): Target must be an ISO 639-1 language code. See https://g.co/cloud/translate/v2/translate-reference#supported_languages """ + import six from google.cloud import translate_v2 as translate translate_client = translate.Client() @@ -108,6 +107,7 @@ def translate_text(target, text): Target must be an ISO 639-1 language code. See https://g.co/cloud/translate/v2/translate-reference#supported_languages """ + import six from google.cloud import translate_v2 as translate translate_client = translate.Client()