Skip to content

Commit 369dcca

Browse files
author
Takashi Matsuo
authored
chore: some lint fixes (#3746)
1 parent 31baf7a commit 369dcca

17 files changed

+59
-47
lines changed

healthcare/api-client/fhir/fhir_resources.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from google.auth.transport import requests
2020
from google.oauth2 import service_account
2121

22+
2223
_BASE_URL = "https://healthcare.googleapis.com/v1beta1"
2324

2425

@@ -95,7 +96,7 @@ def create_encounter(
9596
):
9697
"""Creates a new Encounter resource in a FHIR store based on a Patient."""
9798
url = "{}/projects/{}/locations/{}".format(
98-
base_url, project_id, cloud_region, patient_id
99+
base_url, project_id, cloud_region
99100
)
100101

101102
fhir_store_path = "{}/datasets/{}/fhirStores/{}/fhir/Encounter".format(
@@ -152,7 +153,7 @@ def create_observation(
152153
an Encounter.
153154
"""
154155
url = "{}/projects/{}/locations/{}".format(
155-
base_url, project_id, cloud_region, patient_id
156+
base_url, project_id, cloud_region
156157
)
157158

158159
fhir_store_path = "{}/datasets/{}/fhirStores/{}/fhir/Observation".format(

healthcare/api-client/fhir/fhir_resources_test.py

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

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

2019
import backoff
20+
import pytest
2121
from requests.exceptions import HTTPError
2222

2323
# Add datasets for bootstrapping datasets for testing
2424
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "datasets")) # noqa
25-
import datasets
26-
import fhir_stores
27-
import fhir_resources
25+
import datasets # noqa
26+
import fhir_stores # noqa
27+
import fhir_resources # noqa
28+
2829

2930
cloud_region = "us-central1"
3031
base_url = "https://healthcare.googleapis.com/v1beta1"

healthcare/api-client/fhir/fhir_stores.py

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

18-
from googleapiclient import discovery
1918
from google.oauth2 import service_account
19+
from googleapiclient import discovery
2020

2121

2222
# [START healthcare_get_client]

healthcare/api-client/fhir/fhir_stores_test.py

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

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

21-
from google.cloud import exceptions, storage
20+
from google.cloud import exceptions
21+
from google.cloud import storage
22+
import pytest
2223

2324
# Add datasets for bootstrapping datasets for testing
2425
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "datasets")) # noqa
25-
import datasets
26-
import fhir_stores
26+
import datasets # noqa
27+
import fhir_stores # noqa
28+
2729

2830
cloud_region = "us-central1"
2931
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]

healthcare/api-client/hl7v2/hl7v2_messages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
import json
1717
import os
1818

19+
from google.oauth2 import service_account
1920
from googleapiclient import discovery
2021
from googleapiclient.errors import HttpError
21-
from google.oauth2 import service_account
2222

2323

2424
# [START healthcare_get_client]
@@ -212,7 +212,7 @@ def patch_hl7v2_message(
212212
"""Updates the message."""
213213
client = get_client(service_account_json)
214214
hl7v2_message_parent = 'projects/{}/locations/{}'.format(
215-
project_id, cloud_region, dataset_id, hl7v2_store_id)
215+
project_id, cloud_region)
216216
hl7v2_message_name = '{}/datasets/{}/hl7V2Stores/{}/messages/{}'.format(
217217
hl7v2_message_parent, dataset_id, hl7v2_store_id, hl7v2_message_id)
218218

healthcare/api-client/hl7v2/hl7v2_messages_test.py

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

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

2019
import backoff
20+
import pytest
2121

2222
# Add datasets for bootstrapping datasets for testing
2323
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'datasets')) # noqa
24-
import datasets
25-
import hl7v2_stores
26-
import hl7v2_messages
24+
import datasets # noqa
25+
import hl7v2_messages # noqa
26+
import hl7v2_stores # noqa
27+
2728

2829
cloud_region = 'us-central1'
2930
project_id = os.environ['GOOGLE_CLOUD_PROJECT']

healthcare/api-client/hl7v2/hl7v2_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/hl7v2/hl7v2_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 uuid
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 hl7v2_stores
22+
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'datasets')) # noqa
23+
import datasets # noqa
24+
import hl7v2_stores # noqa
25+
2426

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

healthcare/api-client/v1/datasets/datasets_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313
# limitations under the License.
1414

1515
import os
16-
import pytest
1716
import uuid
1817

1918
from googleapiclient.errors import HttpError
19+
import pytest
2020
from retrying import retry
2121

2222
import datasets
2323

24+
2425
cloud_region = 'us-central1'
2526
project_id = os.environ['GOOGLE_CLOUD_PROJECT']
2627

healthcare/api-client/v1/dicom/dicom_stores_test.py

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

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

2019
import backoff
2120
from googleapiclient.errors import HttpError
21+
import pytest
2222

2323
# Add datasets for bootstrapping datasets for testing
2424
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "datasets")) # noqa
25-
import datasets
26-
import dicom_stores
25+
import datasets # noqa
26+
import dicom_stores # noqa
27+
2728

2829
cloud_region = "us-central1"
2930
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]

healthcare/api-client/v1/dicom/dicomweb_test.py

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

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

2019
import backoff
2120
from googleapiclient.errors import HttpError
21+
import pytest
2222

2323
# Add datasets for bootstrapping datasets for testing
2424
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "datasets")) # noqa
25-
import datasets
26-
import dicom_stores
27-
import dicomweb
25+
import datasets # noqa
26+
import dicom_stores # noqa
27+
import dicomweb # noqa
2828

2929
cloud_region = "us-central1"
3030
base_url = "https://healthcare.googleapis.com/v1"

healthcare/api-client/v1/fhir/fhir_resources.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ def create_encounter(
8282
):
8383
"""Creates a new Encounter resource in a FHIR store based on a Patient."""
8484
url = "{}/projects/{}/locations/{}".format(
85-
base_url, project_id, cloud_region, patient_id
85+
base_url, project_id, cloud_region
8686
)
8787

8888
fhir_store_path = "{}/datasets/{}/fhirStores/{}/fhir/Encounter".format(
@@ -139,7 +139,7 @@ def create_observation(
139139
an Encounter.
140140
"""
141141
url = "{}/projects/{}/locations/{}".format(
142-
base_url, project_id, cloud_region, patient_id
142+
base_url, project_id, cloud_region
143143
)
144144

145145
fhir_store_path = "{}/datasets/{}/fhirStores/{}/fhir/Observation".format(

healthcare/api-client/v1/fhir/fhir_resources_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222

2323
# Add datasets for bootstrapping datasets for testing
2424
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "datasets")) # noqa
25-
import datasets
26-
import fhir_stores
27-
import fhir_resources
25+
import datasets # noqa
26+
import fhir_stores # noqa
27+
import fhir_resources # noqa
2828

2929
base_url = "https://healthcare.googleapis.com/v1"
3030
cloud_region = "us-central1"

healthcare/api-client/v1/fhir/fhir_stores_test.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,15 @@
1717
import uuid
1818

1919
import backoff
20-
import pytest
21-
from googleapiclient.errors import HttpError
2220
from google.cloud import storage
21+
from googleapiclient.errors import HttpError
22+
import pytest
2323

2424
# Add datasets for bootstrapping datasets for testing
2525
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "datasets")) # noqa
26-
import datasets
27-
import fhir_stores
26+
import datasets # noqa
27+
import fhir_stores # noqa
28+
2829

2930
cloud_region = "us-central1"
3031
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]

healthcare/api-client/v1/hl7v2/hl7v2_messages.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def patch_hl7v2_message(
208208
"""Updates the message."""
209209
client = get_client()
210210
hl7v2_message_parent = "projects/{}/locations/{}".format(
211-
project_id, cloud_region, dataset_id, hl7v2_store_id
211+
project_id, cloud_region
212212
)
213213
hl7v2_message_name = "{}/datasets/{}/hl7V2Stores/{}/messages/{}".format(
214214
hl7v2_message_parent, dataset_id, hl7v2_store_id, hl7v2_message_id

healthcare/api-client/v1/hl7v2/hl7v2_messages_test.py

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

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

2019
import backoff
2120
from googleapiclient.errors import HttpError
21+
import pytest
2222

2323
# Add datasets for bootstrapping datasets for testing
2424
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "datasets")) # noqa
25-
import datasets
26-
import hl7v2_stores
27-
import hl7v2_messages
25+
import datasets # noqa
26+
import hl7v2_messages # noqa
27+
import hl7v2_stores # noqa
28+
2829

2930
cloud_region = "us-central1"
3031
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]

healthcare/api-client/v1/hl7v2/hl7v2_stores_test.py

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

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

2019
import backoff
2120
from googleapiclient.errors import HttpError
21+
import pytest
2222

2323
# Add datasets for bootstrapping datasets for testing
2424
sys.path.append(os.path.join(os.path.dirname(__file__), "..", "datasets")) # noqa
25-
import datasets
26-
import hl7v2_stores
25+
import datasets # noqa
26+
import hl7v2_stores # noqa
27+
2728

2829
cloud_region = "us-central1"
2930
project_id = os.environ["GOOGLE_CLOUD_PROJECT"]

0 commit comments

Comments
 (0)