Skip to content

Commit

Permalink
Fix linting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
kurtisvg committed Oct 9, 2018
1 parent 2cdd075 commit 6e7980f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
3 changes: 3 additions & 0 deletions spanner/cloud-client/ENV_VARS.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export GCLOUD_PROJECT=arc-nl
export SPANNER_INSTANCE=arc-db
export GOOGLE_APPLICATION_CREDENTIALS=/Users/kvg/workspace/python-docs-samples/spanner/cloud-client/arc-nl-46c2c3067bed.json
12 changes: 12 additions & 0 deletions spanner/cloud-client/arc-nl-46c2c3067bed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"type": "service_account",
"project_id": "arc-nl",
"private_key_id": "46c2c3067bed929f1735189ac3b13bd4a1cad3b7",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC0iq8lumopC3A8\ntOedY/qATSkddzII46jS7HUnDlaAFqX/igN0lM2t5rKlkf7qUxNkrW6GBmeh4Lta\nJfh7f4G4pk+Y+h2WxNe+f3u4aiLWQM/Lv/5MdXr52HsnvhUc/9yE+q3aja2gs3rT\nT29naFTgTZXNjJoN1FNI9L1vJ+MjoK691gKkfBi7nWspkb8ftrPHH7AL/B/ItmJh\nEuAxtAwZBE+bDhc1ANrzt+ICYy3gTPcax1DVnmuYKIa1eQZxnIT1J5dmsMii3c5B\nKSLqpa0+AsQPy8l29JpVzk2+NmNWl+8v7IrLW+Gn+DCHdp5HegPo+t7NoGdMOrwh\nN0lkE7L7AgMBAAECggEBAJFArs+E3lptaHx+84WOZYEKE1Uwi+HY///K3Cpy/6cI\nEb+5UzRdb+lEnWBWSKhP9F9gpXZQ+tmjTDioKfV6TWy46XtjZ6Dgd889E9X4FlUY\nSdZcfoUXU7xlrhf4d1YgiFO4t10J9bJAFEakNzYUG41m/mokf+E2fVdK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zdj419MA==\n-----END PRIVATE KEY-----\n",
"client_email": "924949159544-compute@developer.gserviceaccount.com",
"client_id": "108258106978375729879",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://accounts.google.com/o/oauth2/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/924949159544-compute%40developer.gserviceaccount.com"
}
8 changes: 4 additions & 4 deletions spanner/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,8 @@ def update_data_with_dml_timestamp(instance_id, database_id):
def update_albums(transaction):
row_ct = transaction.execute_update(
"UPDATE Albums "
"SET LastUpdateTime = PENDING_COMMIT_TIMESTAMP() "
"WHERE SingerId = 1"
"SET LastUpdateTime = PENDING_COMMIT_TIMESTAMP() "
"WHERE SingerId = 1"
)

print("{} record(s) updated.".format(row_ct))
Expand All @@ -836,7 +836,7 @@ def read_then_write(transaction):
# Insert record.
row_ct = transaction.execute_update(
"INSERT Singers (SingerId, FirstName, LastName) "
" VALUES (11, 'Timothy', 'Campbell')"
" VALUES (11, 'Timothy', 'Campbell')"
)
print("{} record(s) inserted.".format(row_ct))

Expand Down Expand Up @@ -949,7 +949,7 @@ def transfer_budget(transaction):
params={"AlbumBudget": second_album_budget},
param_types={"AlbumBudget": spanner.param_types.INT64}
)

print("Transferred {} from Album1's budget to Album2's".format(
transfer_amount))

Expand Down
2 changes: 1 addition & 1 deletion spanner/cloud-client/snippets_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,4 +269,4 @@ def update_data_with_partitioned_dml(capsys):
def delete_data_with_partitioned_dml(capsys):
snippets.delete_data_with_partitioned_dml(INSTANCE_ID, DATABASE_ID)
out, _ = capsys.readouterr()
assert "1 record(s) deleted" in out
assert "1 record(s) deleted" in out

0 comments on commit 6e7980f

Please sign in to comment.