Skip to content

Commit 2ca0fb1

Browse files
chore(python): run blacken session for all directories with a noxfile (#262)
Source-Link: googleapis/synthtool@bc0de6e Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:39ad8c0570e4f5d2d3124a509de4fe975e799e2b97e0f58aed88f8880d5a8b60 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 57a4be9 commit 2ca0fb1

File tree

8 files changed

+19
-9
lines changed

8 files changed

+19
-9
lines changed

datacatalog/quickstart/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525

2626
def temp_suffix():
2727
now = datetime.datetime.now()
28-
return "{}_{}".format(
29-
now.strftime("%Y%m%d%H%M%S"), uuid.uuid4().hex[:8]
30-
)
28+
return "{}_{}".format(now.strftime("%Y%m%d%H%M%S"), uuid.uuid4().hex[:8])
3129

3230

3331
@pytest.fixture(scope="session")
@@ -42,7 +40,9 @@ def bigquery_client(credentials, project_id):
4240

4341
@pytest.fixture(scope="session")
4442
def default_credentials():
45-
return google.auth.default(scopes=["https://www.googleapis.com/auth/cloud-platform"])
43+
return google.auth.default(
44+
scopes=["https://www.googleapis.com/auth/cloud-platform"]
45+
)
4646

4747

4848
@pytest.fixture(scope="session")

datacatalog/quickstart/quickstart_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@
1515
import quickstart
1616

1717

18-
def test_quickstart(capsys, client, project_id, dataset_id, table_id, random_tag_template_id):
18+
def test_quickstart(
19+
capsys, client, project_id, dataset_id, table_id, random_tag_template_id
20+
):
1921
location = "us-central1"
2022
override_values = {
2123
"project_id": project_id,
2224
"dataset_id": dataset_id,
2325
"table_id": table_id,
24-
"tag_template_id": random_tag_template_id
26+
"tag_template_id": random_tag_template_id,
2527
}
2628
tag_template_name = client.tag_template_path(
2729
project_id, location, random_tag_template_id

datacatalog/v1beta1/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def entry(client, entry_group_name):
9393
type_=datacatalog_v1beta1.EntryType.DATA_STREAM,
9494
name="samples_test_entry",
9595
user_specified_system="sample_system",
96-
)
96+
),
9797
)
9898

9999
entry = client.create_entry(request)

datacatalog/v1beta1/get_entry.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def sample_get_entry(
2828
):
2929
# [START data_catalog_get_entry_v1beta1]
3030
from google.cloud import datacatalog_v1beta1
31+
3132
"""
3233
Get Entry
3334
@@ -59,7 +60,9 @@ def main():
5960

6061
parser = argparse.ArgumentParser()
6162
parser.add_argument("--project_id", type_=str, default="[Google Cloud Project ID]")
62-
parser.add_argument("--location_id", type_=str, default="[Google Cloud Location ID]")
63+
parser.add_argument(
64+
"--location_id", type_=str, default="[Google Cloud Location ID]"
65+
)
6366
parser.add_argument("--entry_group_id", type_=str, default="[Entry Group ID]")
6467
parser.add_argument("--entry_id", type_=str, default="[Entry ID]")
6568
args = parser.parse_args()

datacatalog/v1beta1/lookup_entry.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
def sample_lookup_entry(resource_name: str):
2727
# [START data_catalog_lookup_entry_v1beta1]
2828
from google.cloud import datacatalog_v1beta1
29+
2930
"""
3031
Lookup Entry
3132

datacatalog/v1beta1/lookup_entry_sql_resource.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
def sample_lookup_entry(sql_name: str):
2727
# [START data_catalog_lookup_entry_sql_resource_v1beta1]
2828
from google.cloud import datacatalog_v1beta1
29+
2930
"""
3031
Lookup Entry using SQL resource
3132

datacatalog/v1beta1/search.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def sample_search_catalog(
2828
):
2929
# [START data_catalog_search_v1beta1]
3030
from google.cloud import datacatalog_v1beta1
31+
3132
"""
3233
Search Catalog
3334

datacatalog/v1beta1/test_search.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,7 @@
1717

1818

1919
def test_search_catalog(client, project_id, entry_group_name):
20-
results = search.sample_search_catalog(project_id, False, f"name:{entry_group_name}")
20+
results = search.sample_search_catalog(
21+
project_id, False, f"name:{entry_group_name}"
22+
)
2123
assert results is not None

0 commit comments

Comments
 (0)