Skip to content

Commit

Permalink
FIX: sort nested entries in cSpell config
Browse files Browse the repository at this point in the history
  • Loading branch information
redeboer committed Oct 9, 2023
1 parent 1ad23c0 commit ad52afc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/repoma/check_dev_files/cspell.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
update_single_hook_precommit_repo,
)
from repoma.utilities.readme import add_badge, remove_badge
from repoma.utilities.vscode import sort_case_insensitive

__VSCODE_EXTENSION_NAME = "streetsidesoftware.code-spell-checker"

Expand Down Expand Up @@ -229,4 +230,4 @@ def sort_key(value: Any) -> str:
return sorted(content, key=sort_key)
if section_name == "ignoreWords":
return sorted(content)
return sorted(content, key=lambda s: s.lower() if isinstance(s, str) else s)
return sort_case_insensitive(content)

0 comments on commit ad52afc

Please sign in to comment.