From 1dc85c772ae53ea09df2b1c2b635f234282a842e Mon Sep 17 00:00:00 2001
From: Yoann Schneider <yschneider@teklia.com>
Date: Mon, 15 Apr 2024 20:05:54 +0200
Subject: [PATCH] Introduce UP030

---
 arkindex/images/models.py | 4 ++--
 ruff.toml                 | 2 ++
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arkindex/images/models.py b/arkindex/images/models.py
index 8b904acaf9..9e5e427009 100644
--- a/arkindex/images/models.py
+++ b/arkindex/images/models.py
@@ -218,8 +218,8 @@ class Image(S3FileMixin, IndexableModel):
         if max_width is None and max_height is None:
             resize = "full"
         else:
-            resize = "{0},{1}".format(max_width or "", max_height or "")
-        return "{0}/full/{1}/0/default.jpg".format(self.url.rstrip("/"), resize)
+            resize = "{},{}".format(max_width or "", max_height or "")
+        return "{}/full/{}/0/default.jpg".format(self.url.rstrip("/"), resize)
 
     @property
     def s3_put_url(self):
diff --git a/ruff.toml b/ruff.toml
index 5ae44b642e..bc95bd11bf 100644
--- a/ruff.toml
+++ b/ruff.toml
@@ -37,6 +37,8 @@ select = [
     "UP024",
     # unpacked-list-comprehension
     "UP027",
+    # format-literals
+    "UP030",
 ]
 ignore = ["E501", "RET502", "RET503"]
 
-- 
GitLab