Skip to content

Commit 8edb839

Browse files
author
Garvit Verma
committed
moved the sorting of item type mapping out of the loop
1 parent 910fbde commit 8edb839

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

hooks/basic/collector.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -688,13 +688,13 @@ def _get_filtered_item_types_from_settings(self, settings, path, is_sequence, cr
688688
template_item_type_mapping.append((matched_resolution_order, matched_work_path_template,
689689
current_item_type))
690690

691-
max_resolution_order = max(
692-
[resolution_order for resolution_order, work_path_template, item_type in template_item_type_mapping]
693-
)
691+
max_resolution_order = max(
692+
[resolution_order for resolution_order, work_path_template, item_type in template_item_type_mapping]
693+
)
694694

695-
# sort the list on resolution_order, giving preference to a matching template
696-
template_item_type_mapping.sort(
697-
key=lambda elem: elem[0] if not elem[1] else elem[0]-max_resolution_order)
695+
# sort the list on resolution_order, giving preference to a matching template
696+
template_item_type_mapping.sort(
697+
key=lambda elem: elem[0] if not elem[1] else elem[0]-max_resolution_order)
698698

699699
return template_item_type_mapping
700700

0 commit comments

Comments
 (0)