Skip to content

Commit

Permalink
chore: drop six (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver authored Sep 22, 2021
1 parent ba84a98 commit 6fb3c38
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions translation/samples/snippets/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,11 @@ 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()

if isinstance(text, six.binary_type):
if isinstance(text, bytes):
text = text.decode("utf-8")

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

0 comments on commit 6fb3c38

Please sign in to comment.