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

@@ -164,12 +164,12 @@ class ItakuAPI():
return self._pagination(endpoint, params, self.image)
def image(self, image_id):
endpoint = "/galleries/images/{}/".format(image_id)
endpoint = f"/galleries/images/{image_id}/"
return self._call(endpoint)
@memcache(keyarg=1)
def user(self, username):
return self._call("/user_profiles/{}/".format(username))
return self._call(f"/user_profiles/{username}/")
def _call(self, endpoint, params=None):
if not endpoint.startswith("http"):