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

@@ -108,7 +108,7 @@ class ToyhouseArtExtractor(ToyhouseExtractor):
example = "https://www.toyhou.se/USER/art"
def posts(self):
return self._pagination("/{}/art".format(self.user))
return self._pagination(f"/{self.user}/art")
def metadata(self):
return {"user": self.user}
@@ -124,6 +124,6 @@ class ToyhouseImageExtractor(ToyhouseExtractor):
example = "https://toyhou.se/~images/12345"
def posts(self):
url = "{}/~images/{}".format(self.root, self.user)
url = f"{self.root}/~images/{self.user}"
return (self._parse_post(
self.request(url).text, '<img class="mw-100" src="'),)