replace 2-element f-strings with simple '+' concatenations

Python's 'ast' module and its 'NodeVisitor' class
were incredibly helpful in identifying these
This commit is contained in:
Mike Fährmann
2025-12-21 15:09:03 +01:00
parent d0f06be0d2
commit 00c6821a3f
74 changed files with 229 additions and 237 deletions

View File

@@ -510,7 +510,7 @@ class NewgroundsFavoriteExtractor(NewgroundsExtractor):
def _extract_favorites(self, page):
return [
self.root + path
for path in text.extract_iter(page, f'href="{self.root}', '"')
for path in text.extract_iter(page, 'href="' + self.root, '"')
]
@@ -519,7 +519,6 @@ class NewgroundsFollowingExtractor(NewgroundsFavoriteExtractor):
subcategory = "following"
pattern = (USER_PATTERN + r"/favorites/(following)"
r"(?:(?:/page/|/?\?page=)(\d+))?")
example = "https://USER.newgrounds.com/favorites/following"
def items(self):