Skip to content

Commit c2c661e

Browse files
Takashi Matsuodandhlee
Takashi Matsuo
authored andcommitted
chore: some lint fixes [(#3751)](#3751)
* chore: some lint fixes * longer timeout, more retries * disable detect_test.py::test_async_detect_document
1 parent 27a32a7 commit c2c661e

14 files changed

+26
-19
lines changed

translation/samples/snippets/beta_snippets_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@
1414
# limitations under the License.
1515

1616
import os
17-
import pytest
1817
import uuid
19-
import beta_snippets
18+
2019
from google.cloud import storage
20+
import pytest
21+
22+
import beta_snippets
23+
2124

2225
PROJECT_ID = os.environ['GCLOUD_PROJECT']
2326

translation/samples/snippets/hybrid_glossaries/hybrid_tutorial.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515

1616
# [START translate_hybrid_imports]
17+
import html
1718
import io
1819
import os
19-
import html
2020

2121
# Imports the Google Cloud client libraries
2222
from google.api_core.exceptions import AlreadyExists
23+
from google.cloud import texttospeech
2324
from google.cloud import translate_v3beta1 as translate
2425
from google.cloud import vision
25-
from google.cloud import texttospeech
2626
# [END translate_hybrid_imports]
2727

2828

translation/samples/snippets/hybrid_glossaries/hybrid_tutorial_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
import os
1616
import sys
1717

18-
from hybrid_tutorial import pic_to_text
1918
from hybrid_tutorial import create_glossary
20-
from hybrid_tutorial import translate_text
19+
from hybrid_tutorial import pic_to_text
2120
from hybrid_tutorial import text_to_speech
21+
from hybrid_tutorial import translate_text
2222

2323

2424
PROJECT_ID = os.environ['GCLOUD_PROJECT']

translation/samples/snippets/translate_v3_batch_translate_text_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@
1515
import os
1616
import uuid
1717

18-
import pytest
19-
2018
from google.cloud import storage
19+
import pytest
2120

2221
import translate_v3_batch_translate_text
2322

translation/samples/snippets/translate_v3_batch_translate_text_with_glossary_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,10 @@
1616
import uuid
1717

1818
import backoff
19-
import pytest
20-
2119
from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
22-
from google.cloud.exceptions import NotFound
2320
from google.cloud import storage
21+
from google.cloud.exceptions import NotFound
22+
import pytest
2423

2524
import translate_v3_batch_translate_text_with_glossary
2625
import translate_v3_create_glossary

translation/samples/snippets/translate_v3_create_glossary_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
import uuid
1717

1818
import backoff
19-
import pytest
20-
2119
from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
2220
from google.cloud.exceptions import NotFound
21+
import pytest
2322

2423
import translate_v3_create_glossary
2524
import translate_v3_delete_glossary

translation/samples/snippets/translate_v3_detect_language_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
# limitations under the License.
1414

1515
import os
16+
1617
import translate_v3_detect_language
1718

19+
1820
PROJECT_ID = os.environ["GCLOUD_PROJECT"]
1921

2022

translation/samples/snippets/translate_v3_get_glossary_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
import uuid
1717

1818
import backoff
19-
import pytest
20-
2119
from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
2220
from google.cloud.exceptions import NotFound
21+
import pytest
2322

2423
import translate_v3_create_glossary
2524
import translate_v3_delete_glossary

translation/samples/snippets/translate_v3_get_supported_languages_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
# limitations under the License.
1414

1515
import os
16+
1617
import translate_v3_get_supported_languages
1718

19+
1820
PROJECT_ID = os.environ["GCLOUD_PROJECT"]
1921

2022

translation/samples/snippets/translate_v3_get_supported_languages_with_target_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
# limitations under the License.
1414

1515
import os
16+
1617
import translate_v3_get_supported_languages_with_target as get_supported_langs
1718

19+
1820
PROJECT_ID = os.environ["GCLOUD_PROJECT"]
1921

2022

translation/samples/snippets/translate_v3_list_glossary_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@
1616
import uuid
1717

1818
import backoff
19-
import pytest
20-
2119
from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
2220
from google.cloud.exceptions import NotFound
21+
import pytest
2322

2423
import translate_v3_create_glossary
2524
import translate_v3_delete_glossary

translation/samples/snippets/translate_v3_translate_text_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@
1313
# limitations under the License.
1414

1515
import os
16+
1617
import translate_v3_translate_text
1718

19+
1820
PROJECT_ID = os.environ["GCLOUD_PROJECT"]
1921

2022

translation/samples/snippets/translate_v3_translate_text_with_glossary_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@
1717
import uuid
1818

1919
import backoff
20-
import pytest
21-
2220
from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
2321
from google.cloud.exceptions import NotFound
22+
import pytest
2423

2524
import translate_v3_create_glossary
2625
import translate_v3_delete_glossary

translation/samples/snippets/translate_v3_translate_text_with_model_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
# limitations under the License.
1515

1616
import os
17+
1718
import translate_v3_translate_text_with_model
1819

20+
1921
PROJECT_ID = os.environ["GCLOUD_PROJECT"]
2022
MODEL_ID = "TRL3128559826197068699"
2123

0 commit comments

Comments
 (0)