From d918a9fc604f066f49172ceb08866760f8d38165 Mon Sep 17 00:00:00 2001
From: Yoann Schneider <yschneider@teklia.com>
Date: Fri, 3 May 2024 17:45:42 +0200
Subject: [PATCH] Comply with UP034

---
 arkindex/training/management/commands/migrate_workers.py | 2 +-
 ruff.toml                                                | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/arkindex/training/management/commands/migrate_workers.py b/arkindex/training/management/commands/migrate_workers.py
index 6e011fe5a6..e499d74e2f 100644
--- a/arkindex/training/management/commands/migrate_workers.py
+++ b/arkindex/training/management/commands/migrate_workers.py
@@ -46,7 +46,7 @@ def choose(instances, name_field="name", title="Pick one item", allow_skip=False
         choices["0"] = choices["skip"] = None
     for i, (id, name) in enumerate(items, 1):
         print(f"{i}: {id} {name}")
-        choices[str((i))] = choices[str(id)] = choices[name] = id
+        choices[str(i)] = choices[str(id)] = choices[name] = id
 
     # Get the first valid choice
     while True:
diff --git a/ruff.toml b/ruff.toml
index 6d75c7c631..1232c30820 100644
--- a/ruff.toml
+++ b/ruff.toml
@@ -43,6 +43,8 @@ select = [
     "UP031",
     # f-string
     "UP032",
+    # extraneous-parentheses
+    "UP034",
 ]
 ignore = ["E501", "RET502", "RET503"]
 
-- 
GitLab