Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
chore: some lint fixes [(#3751)](GoogleCloudPlatform/python-docs-samp…
Browse files Browse the repository at this point in the history
…les#3751)

* chore: some lint fixes

* longer timeout, more retries

* disable detect_test.py::test_async_detect_document
  • Loading branch information
Takashi Matsuo authored and danoscarmike committed Jul 31, 2020
1 parent da455b1 commit f5f439e
Show file tree
Hide file tree
Showing 14 changed files with 26 additions and 19 deletions.
7 changes: 5 additions & 2 deletions samples/snippets/beta_snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@
# limitations under the License.

import os
import pytest
import uuid
import beta_snippets

from google.cloud import storage
import pytest

import beta_snippets


PROJECT_ID = os.environ['GCLOUD_PROJECT']

Expand Down
4 changes: 2 additions & 2 deletions samples/snippets/hybrid_glossaries/hybrid_tutorial.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@


# [START translate_hybrid_imports]
import html
import io
import os
import html

# Imports the Google Cloud client libraries
from google.api_core.exceptions import AlreadyExists
from google.cloud import texttospeech
from google.cloud import translate_v3beta1 as translate
from google.cloud import vision
from google.cloud import texttospeech
# [END translate_hybrid_imports]


Expand Down
4 changes: 2 additions & 2 deletions samples/snippets/hybrid_glossaries/hybrid_tutorial_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
import os
import sys

from hybrid_tutorial import pic_to_text
from hybrid_tutorial import create_glossary
from hybrid_tutorial import translate_text
from hybrid_tutorial import pic_to_text
from hybrid_tutorial import text_to_speech
from hybrid_tutorial import translate_text


PROJECT_ID = os.environ['GCLOUD_PROJECT']
Expand Down
3 changes: 1 addition & 2 deletions samples/snippets/translate_v3_batch_translate_text_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@
import os
import uuid

import pytest

from google.cloud import storage
import pytest

import translate_v3_batch_translate_text

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
import uuid

import backoff
import pytest

from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
from google.cloud.exceptions import NotFound
from google.cloud import storage
from google.cloud.exceptions import NotFound
import pytest

import translate_v3_batch_translate_text_with_glossary
import translate_v3_create_glossary
Expand Down
3 changes: 1 addition & 2 deletions samples/snippets/translate_v3_create_glossary_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
import uuid

import backoff
import pytest

from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
from google.cloud.exceptions import NotFound
import pytest

import translate_v3_create_glossary
import translate_v3_delete_glossary
Expand Down
2 changes: 2 additions & 0 deletions samples/snippets/translate_v3_detect_language_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# limitations under the License.

import os

import translate_v3_detect_language


PROJECT_ID = os.environ["GCLOUD_PROJECT"]


Expand Down
3 changes: 1 addition & 2 deletions samples/snippets/translate_v3_get_glossary_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
import uuid

import backoff
import pytest

from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
from google.cloud.exceptions import NotFound
import pytest

import translate_v3_create_glossary
import translate_v3_delete_glossary
Expand Down
2 changes: 2 additions & 0 deletions samples/snippets/translate_v3_get_supported_languages_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# limitations under the License.

import os

import translate_v3_get_supported_languages


PROJECT_ID = os.environ["GCLOUD_PROJECT"]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# limitations under the License.

import os

import translate_v3_get_supported_languages_with_target as get_supported_langs


PROJECT_ID = os.environ["GCLOUD_PROJECT"]


Expand Down
3 changes: 1 addition & 2 deletions samples/snippets/translate_v3_list_glossary_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
import uuid

import backoff
import pytest

from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
from google.cloud.exceptions import NotFound
import pytest

import translate_v3_create_glossary
import translate_v3_delete_glossary
Expand Down
2 changes: 2 additions & 0 deletions samples/snippets/translate_v3_translate_text_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
# limitations under the License.

import os

import translate_v3_translate_text


PROJECT_ID = os.environ["GCLOUD_PROJECT"]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
import uuid

import backoff
import pytest

from google.api_core.exceptions import DeadlineExceeded, GoogleAPICallError
from google.cloud.exceptions import NotFound
import pytest

import translate_v3_create_glossary
import translate_v3_delete_glossary
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
# limitations under the License.

import os

import translate_v3_translate_text_with_model


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

Expand Down

0 comments on commit f5f439e

Please sign in to comment.