From c547ba59906bdd0ccebe5d4592739227dd0c73eb Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sat, 28 May 2022 12:15:54 +1000 Subject: Convert from python "...".format() to f"..." --- backend/data/enwiki/lookupPage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'backend/data/enwiki/lookupPage.py') diff --git a/backend/data/enwiki/lookupPage.py b/backend/data/enwiki/lookupPage.py index c795c35..1d379e7 100755 --- a/backend/data/enwiki/lookupPage.py +++ b/backend/data/enwiki/lookupPage.py @@ -26,7 +26,7 @@ if row == None: sys.exit(0) (_, pageOffset, endOffset) = row dbCon.close() -print("Found chunk at offset {}".format(pageOffset)) +print(f"Found chunk at offset {pageOffset}") # Read dump file print("Reading dump file") content = [] @@ -51,7 +51,7 @@ with open(dumpFile, mode='rb') as file: titleLine = lines[lineIdx] if titleLine.lstrip() == '' + pageTitle + '': found = True - print("Found title in chunk as page {}".format(pageNum)) + print(f"Found title in chunk as page {pageNum}") content.append(line) content.append(titleLine) while True: -- cgit v1.2.3