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

@@ -60,7 +60,7 @@ class AgnphExtractor(booru.BooruExtractor):
params["page"] += 1
def _html(self, post):
url = "{}/gallery/post/show/{}/".format(self.root, post["id"])
url = f"{self.root}/gallery/post/show/{post['id']}/"
return self.request(url).text
def _tags(self, post, page):
@@ -103,7 +103,6 @@ class AgnphPostExtractor(AgnphExtractor):
example = "https://agn.ph/gallery/post/show/12345/"
def posts(self):
url = "{}/gallery/post/show/{}/?api=xml".format(
self.root, self.groups[0])
url = f"{self.root}/gallery/post/show/{self.groups[0]}/?api=xml"
post = self.request_xml(url)
return (self._xml_to_dict(post),)