From f8203a1766c3e59ebfe30f2466c9376ba336d8a9 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Sat, 22 Mar 2025 10:15:14 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8(back)=20lint=20code=20with=20ruff?= =?UTF-8?q?=200.11.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit New Ruff rule (C420) detects code that should be linted. We apply this new rule on our code. --- src/backend/core/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/core/models.py b/src/backend/core/models.py index 36e799f1..34c3f71a 100644 --- a/src/backend/core/models.py +++ b/src/backend/core/models.py @@ -96,7 +96,7 @@ class LinkReachChoices(models.TextChoices): """ # If no ancestors, return all options if not ancestors_links: - return {reach: LinkRoleChoices.values for reach in cls.values} + return dict.fromkeys(cls.values, LinkRoleChoices.values) # Initialize result with all possible reaches and role options as sets result = {reach: set(LinkRoleChoices.values) for reach in cls.values}