8000 lint fix · larkee/python-docs-samples@447ad6b · GitHub
[go: up one dir, main page]

Skip to content

Commit 447ad6b

Browse files
committed
lint fix
1 parent 9d429b9 commit 447ad6b

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

spanner/cloud-client/backup_sample.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,9 +170,11 @@ def list_backups(instance_id, database_id, backup_id):
170170

171171
# List all backups that expire before a timestamp.
172172
expire_time = datetime.utcnow().replace(microsecond=0) + timedelta(days=30)
173-
print("All backups with expire_time before \"{}-{}-{}T{}:{}:{}Z\":".format(*expire_time.timetuple()))
173+
print("All backups with expire_time before \"{}-{}-{}T{}:{}:{}Z\":".format(
174+
*expire_time.timetuple()))
174175
for backup in instance.list_backups(
175-
filter_="expire_time < \"{}-{}-{}T{}:{}:{}Z\"".format(*expire_time.timetuple())):
176+
filter_="expire_time < \"{}-{}-{}T{}:{}:{}Z\"".format(
177+
*expire_time.timetuple())):
176178
print(backup.name)
177179

178180
# List all backups with a size greater than some bytes.
@@ -182,9 +184,11 @@ def list_backups(instance_id, database_id, backup_id):
182184

183185
# List backups that were created after a timestamp that are also ready.
184186
create_time = datetime.utcnow().replace(microsecond=0) - timedelta(days=1)
185-
print("All backups created after \"{}-{}-{}T{}:{}:{}Z\" and are READY:".format(*create_time.timetuple()))
187+
print("All backups created after \"{}-{}-{}T{}:{}:{}Z\" and are READY:".format(
188+
*create_time.timetuple()))
186189
for backup in instance.list_backups(
187-
filter_="create_time >= \"{}-{}-{}T{}:{}:{}Z\" AND state:READY".format(*create_time.timetuple())):
190+
filter_="create_time >= \"{}-{}-{}T{}:{}:{}Z\" AND state:READY".format(
191+
*create_time.timetuple())):
188192
print(backup.name)
189193
# [END spanner_list_backups]
190194

spanner/cloud-client/backup_sample_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_list_backups(capsys, spanner_instance):
9696
backup_sample.list_backups(INSTANCE_ID, DATABASE_ID, BACKUP_ID)
9797
out, _ = capsys.readouterr()
9898
id_count = out.count(BACKUP_ID)
99-
assert id_count is 6
99+
assert id_count == 6
100100

101101

102102
def test_delete_backup(capsys, spanner_instance):

0 commit comments

Comments
 (0)
0