aboutsummaryrefslogtreecommitdiff
path: root/backend/data/genLinkedImgs.py
diff options
context:
space:
mode:
authorTerry Truong <terry06890@gmail.com>2022-05-28 12:15:54 +1000
committerTerry Truong <terry06890@gmail.com>2022-05-28 12:15:54 +1000
commitc547ba59906bdd0ccebe5d4592739227dd0c73eb (patch)
tree99e35a5c0edd4c473b3b760a2d1cc75153572b6b /backend/data/genLinkedImgs.py
parent9f0dcdea1049a59cd1fb4f0872edee1b7a87a4e6 (diff)
Convert from python "...".format() to f"..."
Diffstat (limited to 'backend/data/genLinkedImgs.py')
-rwxr-xr-xbackend/data/genLinkedImgs.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/data/genLinkedImgs.py b/backend/data/genLinkedImgs.py
index 2e3fdce..6e26ca4 100755
--- a/backend/data/genLinkedImgs.py
+++ b/backend/data/genLinkedImgs.py
@@ -27,7 +27,7 @@ query = "SELECT nodes.name, eol_ids.id FROM" \
" INNER JOIN images ON eol_ids.id = images.eol_id"
for (name, eolId) in dbCur.execute(query):
resolvedNodes[name] = eolId
-print("Got {} nodes".format(len(resolvedNodes)))
+print(f"Got {len(resolvedNodes)} nodes")
# Iterate through resolved nodes, resolving ancestors where able
print("Resolving ancestor nodes")
nodesToResolve = {}
@@ -37,7 +37,7 @@ iterNum = 0
while len(resolvedNodes) > 0:
iterNum += 1
if iterNum % 1e3 == 0:
- print("At iteration {}".format(iterNum))
+ print(f"At iteration {iterNum}")
# Get next node
(nodeName, eolId) = resolvedNodes.popitem()
processedNodes[nodeName] = eolId
@@ -85,7 +85,7 @@ iterNum = 0
for nodeName in processedNodes.keys():
iterNum += 1
if iterNum % 1e3 == 0:
- print("At iteration {}".format(iterNum))
+ print(f"At iteration {iterNum}")
#
match = compoundNameRegex.fullmatch(nodeName)
if match != None: