replace old %-formatted and .format(…) strings with f-strings (#7671)

mostly using flynt
https://github.com/ikamensh/flynt
This commit is contained in:
Mike Fährmann
2025-06-28 19:36:16 +02:00
parent f77e98b57d
commit 9dbe33b6de
167 changed files with 756 additions and 891 deletions

View File

@@ -26,8 +26,7 @@ class SlidesharePresentationExtractor(GalleryExtractor):
def __init__(self, match):
self.user, self.presentation = match.groups()
url = "https://www.slideshare.net/{}/{}".format(
self.user, self.presentation)
url = f"https://www.slideshare.net/{self.user}/{self.presentation}"
GalleryExtractor.__init__(self, match, url)
def metadata(self, page):
@@ -47,11 +46,8 @@ class SlidesharePresentationExtractor(GalleryExtractor):
def images(self, page):
slides = self.slideshow["slides"]
begin = "{}/{}/95/{}-".format(
slides["host"],
slides["imageLocation"],
slides["title"],
)
begin = (f"{slides['host']}/{slides['imageLocation']}"
f"/95/{slides['title']}-")
end = "-1024.jpg"
return [