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

@@ -201,7 +201,7 @@ class SankakuBooksExtractor(SankakuExtractor):
params = {"tags": self.tags, "pool_type": "0"}
for pool in self.api.pools_keyset(params):
pool["_extractor"] = SankakuPoolExtractor
url = "https://sankaku.app/books/{}".format(pool["id"])
url = f"https://sankaku.app/books/{pool['id']}"
yield Message.Queue, url, pool
@@ -225,10 +225,10 @@ class SankakuAPI():
def notes(self, post_id):
params = {"lang": "en"}
return self._call("/posts/{}/notes".format(post_id), params)
return self._call(f"/posts/{post_id}/notes", params)
def tags(self, post_id):
endpoint = "/posts/{}/tags".format(post_id)
endpoint = f"/posts/{post_id}/tags"
params = {
"lang" : "en",
"page" : 1,