-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: fix formatting for handwritten translate files #15585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,6 @@ | |
|
|
||
| """Client for interacting with the Google Cloud Translation API.""" | ||
|
|
||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| import google.api_core.client_options | ||
| from google.cloud.client import Client as BaseClient | ||
|
|
||
|
|
@@ -174,9 +173,9 @@ def detect_language(self, values): | |
| if len(detections[index]) == 1: | ||
| detections[index] = detections[index][0] | ||
| else: | ||
| message = ( | ||
| "Expected a single detection per value, API " "returned %d" | ||
| ) % (len(detections[index]),) | ||
| message = ("Expected a single detection per value, API returned %d") % ( | ||
| len(detections[index]), | ||
| ) | ||
| raise ValueError(message, value, detections[index]) | ||
|
Comment on lines
+177
to
179
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The reformatting of the message = ("Expected a single detection per value, API returned %d") % (len(detections[index]),) |
||
|
|
||
| detections[index]["input"] = value | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing this extra blank line improves code formatting and adheres to common Python style guides that discourage excessive blank lines.