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

@@ -28,7 +28,7 @@ class _2chenThreadExtractor(Extractor):
self.board, self.thread = match.groups()
def items(self):
url = "{}/{}/{}".format(self.root, self.board, self.thread)
url = f"{self.root}/{self.board}/{self.thread}"
page = self.request(url, encoding="utf-8", notfound="thread").text
data = self.metadata(page)
yield Message.Directory, data
@@ -89,7 +89,7 @@ class _2chenBoardExtractor(Extractor):
self.board = match[1]
def items(self):
url = "{}/{}/catalog".format(self.root, self.board)
url = f"{self.root}/{self.board}/catalog"
page = self.request(url, notfound="board").text
data = {"_extractor": _2chenThreadExtractor}
for thread in text.extract_iter(