File tree Expand file tree Collapse file tree
packages/google-cloud-translate/google/cloud/translate_v2 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414
1515"""Google Cloud Translation API wrapper."""
1616
17-
1817from google .cloud .translate import __version__
1918from google .cloud .translate_v2 .client import Client
2019
Original file line number Diff line number Diff line change 1414
1515"""Client for interacting with the Google Cloud Translation API."""
1616
17-
1817import google .api_core .client_options
1918from google .cloud .client import Client as BaseClient
2019
@@ -174,9 +173,9 @@ def detect_language(self, values):
174173 if len (detections [index ]) == 1 :
175174 detections [index ] = detections [index ][0 ]
176175 else :
177- message = (
178- "Expected a single detection per value, API " "returned %d"
179- ) % ( len ( detections [ index ]),)
176+ message = ("Expected a single detection per value, API returned %d" ) % (
177+ len ( detections [ index ]),
178+ )
180179 raise ValueError (message , value , detections [index ])
181180
182181 detections [index ]["input" ] = value
You can’t perform that action at this time.
0 commit comments