Skip to content

Commit 97b9a3e

Browse files
tseaverdandhlee
authored andcommitted
chore: drop six (#253)
1 parent d32e4ca commit 97b9a3e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

translation/samples/snippets/snippets.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,11 @@ def translate_text_with_model(target, text, model="nmt"):
8585
Target must be an ISO 639-1 language code.
8686
See https://g.co/cloud/translate/v2/translate-reference#supported_languages
8787
"""
88-
import six
8988
from google.cloud import translate_v2 as translate
9089

9190
translate_client = translate.Client()
9291

93-
if isinstance(text, six.binary_type):
92+
if isinstance(text, bytes):
9493
text = text.decode("utf-8")
9594

9695
# Text can also be a sequence of strings, in which case this method

0 commit comments

Comments
 (0)