Commit f8d4a5af authored by Bram Schoenmakers's avatar Bram Schoenmakers

Deduplicate alphabet, but preserve order as it appears in the configuration

parent 1d333708
......@@ -20,6 +20,7 @@ import os
import re
import shlex
from collections import OrderedDict
from itertools import accumulate
from string import ascii_lowercase
......@@ -478,8 +479,9 @@ class _Config:
def identifier_alphabet(self):
alphabet = self.cp.get('topydo', 'identifier_alphabet')
# deduplicate characters alphabet
return list({c: None for c in alphabet}.keys())
# deduplicate characters alphabet. Use a dictionary, but an ordered one
# to keep determinism.
return list(OrderedDict([(c, None) for c in alphabet]).keys())
def config(p_path=None, p_overrides=None):
"""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment