Skip to content

Commit 57c08e2

Browse files
committed
review comments
1 parent 8d649a8 commit 57c08e2

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

tools/spanner/purge_ttl.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,7 @@ def deleter(
6363
)
6464
end = datetime.now()
6565
logging.info(
66-
"{name}: removed {result} rows, {name}_duration: {time}, prefix: {prefix}".format(
67-
name=name, result=result, time=end - start, prefix=prefix
68-
)
69-
)
66+
f"{name}: removed {result} rows, {name}_duration: {end - start}, prefix: {prefix}")
7067

7168

7269
def add_conditions(args, query: str, prefix: Optional[str]):

tools/tokenserver/purge_old_records.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ def purge_old_records(
8585
previous_list = rows
8686
range_msg = ""
8787
if uid_range:
88-
range_msg = (
89-
f" within range {uid_range[0] or 'Start'}" f" to {uid_range[1] or 'End'}"
90-
)
88+
range_msg = f" within range {uid_range[0] or 'Start'} to {uid_range[1] or 'End'}"
9189
logger.info(f"Fetched {len(rows)} rows at offset {offset}{range_msg}")
9290
counter = 0
9391
for row in rows:

tools/user_migration/gen_bso_users.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ def run(self, bso_num):
107107
try:
108108
cursor = connection.cursor()
109109
sql = (
110-
"""select userid, count(*) as count from bso{}"""
111-
""" group by userid order by userid""".format(bso_num)
110+
f"""select userid, count(*) as count from bso{bso_num}"""
111+
""" group by userid order by userid"""
112112
)
113113
if self.args.user_range:
114114
(offset, limit) = self.args.user_range.split(":")

tools/user_migration/old/migrate_user.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ def spanner_transact(transaction):
384384
mod_v,
385385
)
386386
]
387-
logging.debug("### uc: {}".format(uc_columns, uc_values))
387+
logging.debug(f"### uc: {uc_columns} {uc_values}")
388388
transaction.insert("user_collections", columns=uc_columns, values=uc_values)
389389
# add the BSO values.
390390
if args.full and collection_id == META_GLOBAL_COLLECTION_ID:

0 commit comments

Comments
 (0)