From dc94f8dc689ea5614c5a4a87c40b8fd923e70185 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 14 Oct 2022 23:15:11 +0200 Subject: [PATCH] registry: Default to sorting sets of values Not sorting them causes the config file to change when the bot writes it, because order is nondeterministic. This is usually fine, but can be annoying when configs are deployed with Ansible. Closes GH-1516 --- src/registry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/registry.py b/src/registry.py index 3ded34814..2bc3323da 100644 --- a/src/registry.py +++ b/src/registry.py @@ -875,6 +875,7 @@ class SpaceSeparatedListOfStrings(SpaceSeparatedListOf): class SpaceSeparatedSetOfStrings(SpaceSeparatedListOfStrings): __slots__ = () List = set + sorted = True class CommaSeparatedListOfStrings(SeparatedListOf): __slots__ = () @@ -887,6 +888,7 @@ class CommaSeparatedSetOfStrings(SeparatedListOf): __slots__ = () List = set Value = String + sorted = True def splitter(self, s): return re.split(r'\s*,\s*', s) joiner = ', '.join