diff --git a/tools/spell_checker/gen_dictionary.py b/tools/spell_checker/gen_dictionary.py index c302d8782b538..d24798b710474 100644 --- a/tools/spell_checker/gen_dictionary.py +++ b/tools/spell_checker/gen_dictionary.py @@ -24,5 +24,5 @@ def gen_dictionary(): dictionary.add(norm) dict_path = os.path.join(os.path.dirname(__file__), "dictionary.txt") with open(dict_path, "w", encoding="utf-8") as fp: - for word in sorted(dictionary): + for word in sorted(dictionary, key=lambda v: (v.lower(), v)): print(word, file=fp)