Skip to content

Commit 420a8eb

Browse files
author
Takashi Matsuo
committed
chore: some lint fixes
1 parent d6f191b commit 420a8eb

22 files changed

+43
-28
lines changed

translate/automl/translate_v3_batch_translate_text_with_model_test.py

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

1515
import os
16-
import pytest
1716
import uuid
18-
import translate_v3_batch_translate_text_with_model
17+
1918
from google.cloud import storage
19+
import pytest
20+
21+
import translate_v3_batch_translate_text_with_model
22+
2023

2124
PROJECT_ID = os.environ["GCLOUD_PROJECT"]
2225
MODEL_ID = "TRL3128559826197068699"

translate/cloud-client/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

translate/cloud-client/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

translate/cloud-client/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']

translate/cloud-client/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

translate/cloud-client/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

translate/cloud-client/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

translate/cloud-client/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

translate/cloud-client/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

translate/cloud-client/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

translate/cloud-client/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

translate/cloud-client/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

translate/cloud-client/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

translate/cloud-client/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

translate/cloud-client/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

video/cloud-client/analyze/beta_snippets_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
from six.moves.urllib.request import urlopen
1817
import os
1918
import uuid
2019

2120
from google.cloud import storage
2221
import pytest
22+
from six.moves.urllib.request import urlopen
2323

2424
import beta_snippets
2525

26+
2627
POSSIBLE_TEXTS = [
2728
"Google",
2829
"SUR",
@@ -129,6 +130,7 @@ def test_detect_text_gcs(capsys):
129130
out, _ = capsys.readouterr()
130131
assert 'Text' in out
131132

133+
132134
# Flaky InvalidArgument
133135
@pytest.mark.flaky(max_runs=3, min_passes=1)
134136
def test_track_objects(capsys):

video/cloud-client/analyze/video_detect_faces_beta.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
# [START video_detect_faces_beta]
1616
import io
17+
1718
from google.cloud import videointelligence_v1p3beta1 as videointelligence
1819

1920

video/cloud-client/analyze/video_detect_person_beta.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
# [START video_detect_person_beta]
1616
import io
17+
1718
from google.cloud import videointelligence_v1p3beta1 as videointelligence
1819

1920

vision/automl/edge_container_predict/automl_vision_edge_container_predict.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@
2323
"""
2424

2525
import argparse
26-
2726
# [START automl_vision_edge_container_predict]
28-
2927
import base64
3028
import io
3129
import json
30+
3231
import requests
3332

3433

vision/automl/edge_container_predict/automl_vision_edge_container_predict_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
import os
3232
import subprocess
3333
import time
34-
import automl_vision_edge_container_predict as predict
34+
3535
import pytest
3636

37+
import automl_vision_edge_container_predict as predict # noqa
38+
3739

3840
# The absolute path of the current file. This will locate the model_path when
3941
# run docker containers.

vision/cloud-client/detect/vision_batch_annotate_files.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@
1414

1515
# [START vision_batch_annotate_files]
1616

17+
import io
18+
1719
from google.cloud import vision_v1
1820
from google.cloud.vision_v1 import enums
19-
import io
2021

2122

2223
def sample_batch_annotate_files(file_path="path/to/your/document.pdf"):

vision/cloud-client/product_search/import_product_sets_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
from import_product_sets import import_product_sets
2322
from product_in_product_set_management import list_products_in_product_set

0 commit comments

Comments
 (0)