Update old-style strings to f-strings (GH-30384)

Let me know if this sort of change is unwanted...
This commit is contained in:
David Gilbertson 2022-01-04 20:25:56 +11:00 committed by GitHub
parent 5a2a65096c
commit bef48837e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -42,10 +42,10 @@ def handleSlide(slide):
handlePoints(slide.getElementsByTagName("point")) handlePoints(slide.getElementsByTagName("point"))
def handleSlideshowTitle(title): def handleSlideshowTitle(title):
print("<title>%s</title>" % getText(title.childNodes)) print(f"<title>{getText(title.childNodes)}</title>")
def handleSlideTitle(title): def handleSlideTitle(title):
print("<h2>%s</h2>" % getText(title.childNodes)) print(f"<h2>{getText(title.childNodes)}</h2>")
def handlePoints(points): def handlePoints(points):
print("<ul>") print("<ul>")
@ -54,11 +54,11 @@ def handlePoints(points):
print("</ul>") print("</ul>")
def handlePoint(point): def handlePoint(point):
print("<li>%s</li>" % getText(point.childNodes)) print(f"<li>{getText(point.childNodes)}</li>")
def handleToc(slides): def handleToc(slides):
for slide in slides: for slide in slides:
title = slide.getElementsByTagName("title")[0] title = slide.getElementsByTagName("title")[0]
print("<p>%s</p>" % getText(title.childNodes)) print(f"<p>{getText(title.childNodes)}</p>")
handleSlideshow(dom) handleSlideshow(dom)