mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-26 04:32:51 +01:00
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
This commit is contained in:
parent
8c17505221
commit
dc94f8dc68
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user