Skip to content

Commit

Permalink
Use operation for sorted participant children
Browse files Browse the repository at this point in the history
  • Loading branch information
Toddelismyname committed Feb 7, 2025
1 parent 0d04396 commit 06a5de2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions format.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,7 @@ def printChildren(self, element, level):
# Sort participant's children based on the defined order
sorted_participant_children = sorted(
group.getchildren(),
key=lambda child: next(
(rank for prefix, rank in PARTICIPANT_ORDER.items()
if str(child.tag).startswith(prefix)),
6 # Unknown elements appear last
)
key=lambda child: custom_sort_key(child, PARTICIPANT_ORDER)
)

# Separate different types of elements
Expand Down

0 comments on commit 06a5de2

Please sign in to comment.