Skip to content

Commit d2cc365

Browse files
authored
fix: moves import six inside of region tags (#83)
1 parent 5701559 commit d2cc365

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

translation/samples/snippets/snippets.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323

2424
import argparse
2525

26-
import six
27-
2826

2927
def detect_language(text):
3028
# [START translate_detect_language]
@@ -84,6 +82,7 @@ def translate_text_with_model(target, text, model="nmt"):
8482
Target must be an ISO 639-1 language code.
8583
See https://g.co/cloud/translate/v2/translate-reference#supported_languages
8684
"""
85+
import six
8786
from google.cloud import translate_v2 as translate
8887

8988
translate_client = translate.Client()
@@ -108,6 +107,7 @@ def translate_text(target, text):
108107
Target must be an ISO 639-1 language code.
109108
See https://g.co/cloud/translate/v2/translate-reference#supported_languages
110109
"""
110+
import six
111111
from google.cloud import translate_v2 as translate
112112

113113
translate_client = translate.Client()

0 commit comments

Comments
 (0)