🚨(back) lint code with ruff 0.11.2

New Ruff rule (C420) detects code that should be linted. We apply this
new rule on our code.
This commit is contained in:
Manuel Raynaud
2025-03-22 10:15:14 +01:00
parent ce8b98e256
commit f8203a1766

View File

@@ -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}