replace old %-formatted and .format(…) strings with f-strings (#7671)
mostly using flynt https://github.com/ikamensh/flynt
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user