Skip to content

Commit 31baf7a

Browse files
author
Takashi Matsuo
authored
chore: some lint fixes (#3744)
1 parent 231f8e5 commit 31baf7a

18 files changed

+46
-21
lines changed

dlp/inspect_content.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
from __future__ import print_function
1919

2020
import argparse
21-
import os
2221
import json
22+
import os
2323

2424

2525
# [START dlp_inspect_string]

dlp/quickstart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717

1818
from __future__ import print_function
1919

20-
import sys
2120
import argparse
21+
import sys
2222

2323

2424
def quickstart(project_id):

dlp/risk_test.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515
import os
1616
import uuid
1717

18-
import google.cloud.pubsub
1918
import google.cloud.bigquery
19+
import google.cloud.pubsub
2020
import pytest
2121

2222
import risk
2323

24+
2425
UNIQUE_STRING = str(uuid.uuid4()).split("-")[0]
2526
GCLOUD_PROJECT = os.environ.get("GCLOUD_PROJECT")
2627
TABLE_PROJECT = os.environ.get("GCLOUD_PROJECT")
@@ -35,6 +36,7 @@
3536
BIGQUERY_TABLE_ID = "dlp_test_table" + UNIQUE_STRING
3637
BIGQUERY_HARMFUL_TABLE_ID = "harmful" + UNIQUE_STRING
3738

39+
3840
# Create new custom topic/subscription
3941
@pytest.fixture(scope="module")
4042
def topic_id():

document/cloud-client/batch_parse_form_beta.py

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

1515

1616
# [START documentai_batch_parse_form_beta]
17+
import re
18+
1719
from google.cloud import documentai_v1beta2 as documentai
1820
from google.cloud import storage
19-
import re
2021

2122

2223
def batch_parse_form(

document/cloud-client/batch_parse_form_beta_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
# See the License for the specific ladnguage governing permissions and
1313
# limitations under the License.
1414

15-
import batch_parse_form_beta
1615
import os
17-
import pytest
1816
import uuid
17+
1918
from google.cloud import storage
19+
import pytest
20+
21+
import batch_parse_form_beta
22+
2023

2124
BUCKET = 'document-ai-{}'.format(uuid.uuid4())
2225
OUTPUT_PREFIX = 'TEST_OUTPUT_{}'.format(uuid.uuid4())

document/cloud-client/batch_parse_table_beta.py

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

1515

1616
# [START documentai_batch_parse_table_beta]
17+
import re
18+
1719
from google.cloud import documentai_v1beta2 as documentai
1820
from google.cloud import storage
19-
import re
2021

2122

2223
def batch_parse_table(

document/cloud-client/batch_parse_table_beta_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
# See the License for the specific ladnguage governing permissions and
1313
# limitations under the License.
1414

15-
import batch_parse_table_beta
1615
import os
17-
import pytest
1816
import uuid
17+
1918
from google.cloud import storage
19+
import pytest
20+
21+
import batch_parse_table_beta
22+
2023

2124
BUCKET = 'document-ai-{}'.format(uuid.uuid4())
2225
OUTPUT_PREFIX = 'TEST_OUTPUT_{}'.format(uuid.uuid4())

document/cloud-client/parse_form_beta_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 parse_form_beta
1718

19+
1820
PROJECT_ID = os.environ['GCLOUD_PROJECT']
1921
INPUT_URI = 'gs://cloud-samples-data/documentai/form.pdf'
2022

document/cloud-client/parse_table_beta_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 parse_table_beta
1718

19+
1820
PROJECT_ID = os.environ['GCLOUD_PROJECT']
1921
INPUT_URI = 'gs://cloud-samples-data/documentai/invoice.pdf'
2022

document/cloud-client/parse_with_model_beta_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 parse_with_model_beta
1718

19+
1820
PROJECT_ID = os.environ['GCLOUD_PROJECT']
1921
INPUT_URI = 'gs://cloud-samples-data/documentai/invoice.pdf'
2022
AUTOML_NL_MODEL_ID = 'TCN3472481026502981088'

document/cloud-client/quickstart_beta_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 quickstart_beta
1718

19+
1820
PROJECT_ID = os.environ['GCLOUD_PROJECT']
1921
INPUT_URI = 'gs://cloud-samples-data/documentai/invoice.pdf'
2022

document/cloud-client/set_endpoint_beta_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 set_endpoint_beta
1718

19+
1820
PROJECT_ID = os.environ['GCLOUD_PROJECT']
1921
INPUT_URI = 'gs://cloud-samples-data/documentai/invoice.pdf'
2022

endpoints/bookstore-grpc/bookstore_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
import argparse
1818
from concurrent import futures
19-
import time
2019
import os
20+
import time
2121

2222
from google.protobuf import struct_pb2
2323
import grpc
@@ -27,6 +27,7 @@
2727
import bookstore_pb2_grpc
2828
import status
2929

30+
3031
_ONE_DAY_IN_SECONDS = 60 * 60 * 24
3132

3233

healthcare/api-client/datasets/datasets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
import argparse
1616
import os
1717

18+
from google.oauth2 import service_account
1819
from googleapiclient import discovery
1920
from googleapiclient.errors import HttpError
20-
from google.oauth2 import service_account
2121

2222

2323
# [START healthcare_get_client]

healthcare/api-client/dicom/dicom_stores.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
import argparse
1616
import os
1717

18+
from google.oauth2 import service_account
1819
from googleapiclient import discovery
1920
from googleapiclient.errors import HttpError
20-
from google.oauth2 import service_account
2121

2222

2323
# [START healthcare_get_client]

healthcare/api-client/dicom/dicom_stores_test.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@
1313
# limitations under the License.
1414

1515
import os
16-
import pytest
1716
import sys
1817
import time
1918

19+
import pytest
20+
2021
# Add datasets for bootstrapping datasets for testing
21-
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'datasets')) # noqa
22-
import datasets
23-
import dicom_stores
22+
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'datasets')) # noqa
23+
import datasets # noqa
24+
import dicom_stores # noqa
25+
2426

2527
cloud_region = 'us-central1'
2628
project_id = os.environ['GOOGLE_CLOUD_PROJECT']

healthcare/api-client/dicom/dicomweb.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@
1717
import os
1818

1919
from google.auth.transport import requests
20-
from googleapiclient.errors import HttpError
2120
from google.oauth2 import service_account
21+
from googleapiclient.errors import HttpError
22+
2223

2324
_BASE_URL = 'https://healthcare.googleapis.com/v1beta1'
2425

healthcare/api-client/dicom/dicomweb_test.py

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

1515
import os
16-
import pytest
1716
import sys
1817
import time
1918

19+
import pytest
20+
2021
# Add datasets for bootstrapping datasets for testing
2122
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'datasets')) # noqa
22-
import datasets
23-
import dicom_stores
24-
import dicomweb
23+
import datasets # noqa
24+
import dicom_stores # noqa
25+
import dicomweb # noqa
2526

2627
cloud_region = 'us-central1'
2728
base_url = 'https://healthcare.googleapis.com/v1beta1'

0 commit comments

Comments
 (0)