Skip to content

Commit abe95d7

Browse files
gcf-owl-bot[bot]dandhlee
authored andcommitted
chore(python): run blacken session for all directories with a noxfile (#180)
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 d8f9372 commit abe95d7

6 files changed

+14
-20
lines changed

talent/job_search_batch_update_jobs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def batch_update_jobs(
115115
description=description_one,
116116
application_info=application_info,
117117
addresses=addresses,
118-
language_code=language_code_one
118+
language_code=language_code_one,
119119
)
120120

121121
uris_2 = [job_application_url_two]
@@ -129,7 +129,7 @@ def batch_update_jobs(
129129
description=description_two,
130130
application_info=application_info_2,
131131
addresses=addresses_2,
132-
language_code=language_code_two
132+
language_code=language_code_two,
133133
)
134134

135135
jobs = [jobs_element, jobs_element_2]

talent/job_search_commute_search.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ def search_jobs(project_id, tenant_id):
3535
session_id = "Hashed session identifier"
3636
user_id = "Hashed user identifier"
3737
request_metadata = talent.RequestMetadata(
38-
domain=domain,
39-
session_id=session_id,
40-
user_id=user_id
38+
domain=domain, session_id=session_id, user_id=user_id
4139
)
4240
commute_method = talent.CommuteMethod.TRANSIT
4341
seconds = 1800
@@ -55,9 +53,7 @@ def search_jobs(project_id, tenant_id):
5553
# Iterate over all results
5654
results = []
5755
request = talent.SearchJobsRequest(
58-
parent=parent,
59-
request_metadata=request_metadata,
60-
job_query=job_query,
56+
parent=parent, request_metadata=request_metadata, job_query=job_query,
6157
)
6258
for response_item in client.search_jobs(request=request).matching_jobs:
6359
print(f"Job summary: {response_item.job_summary}")

talent/job_search_create_job_custom_attributes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def create_job(project_id, tenant_id, company_id, requisition_id):
5252
requisition_id=requisition_id,
5353
description="This is a description of this job",
5454
language_code="en-us",
55-
custom_attributes={"FOR_STUDENTS": custom_attribute}
55+
custom_attributes={"FOR_STUDENTS": custom_attribute},
5656
)
5757

5858
response = client.create_job(parent=parent, job=job)

talent/job_search_custom_ranking_search.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ def search_jobs(project_id, tenant_id):
3535
session_id = "Hashed session identifier"
3636
user_id = "Hashed user identifier"
3737
request_metadata = talent.RequestMetadata(
38-
domain=domain,
39-
session_id=session_id,
40-
user_id=user_id
38+
domain=domain, session_id=session_id, user_id=user_id
39+
)
40+
importance_level = (
41+
talent.SearchJobsRequest.CustomRankingInfo.ImportanceLevel.EXTREME
4142
)
42-
importance_level = talent.SearchJobsRequest.CustomRankingInfo.ImportanceLevel.EXTREME
4343
ranking_expression = "(someFieldLong + 25) * 0.25"
4444
custom_ranking_info = {
4545
"importance_level": importance_level,
@@ -53,7 +53,7 @@ def search_jobs(project_id, tenant_id):
5353
parent=parent,
5454
request_metadata=request_metadata,
5555
custom_ranking_info=custom_ranking_info,
56-
order_by=order_by
56+
order_by=order_by,
5757
)
5858
for response_item in client.search_jobs(request=request).matching_jobs:
5959
print(f"Job summary: {response_item.job_summary}")

talent/job_search_list_tenants_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
@pytest.fixture(scope="module")
2727
def test_tenant():
2828
client = talent.TenantServiceClient()
29-
external_id = f'test_tenant_{uuid.uuid4().hex}'
29+
external_id = f"test_tenant_{uuid.uuid4().hex}"
3030
parent = f"projects/{PROJECT_ID}"
3131
tenant = {"external_id": external_id}
3232
resp = client.create_tenant(parent=parent, tenant=tenant)

talent/noxfile_config.py

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

2323
TEST_CONFIG_OVERRIDE = {
2424
# You can opt out from the test for specific Python versions.
25-
'ignored_versions': ["2.7"],
26-
25+
"ignored_versions": ["2.7"],
2726
# An envvar key for determining the project id to use. Change it
2827
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
2928
# build specific Cloud project. You can also use your own string
3029
# to use your own Cloud project.
3130
# 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT',
32-
'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
33-
31+
"gcloud_project_env": "BUILD_SPECIFIC_GCLOUD_PROJECT",
3432
# A dictionary you want to inject into your test. Don't put any
3533
# secrets here. These values will override predefined values.
36-
'envs': {},
34+
"envs": {},
3735
}

0 commit comments

Comments
 (0)