Skip to content

Commit

Permalink
Remove unused sorting function
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson committed Jun 14, 2024
1 parent 6b38b75 commit 3b2e604
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions core/help/help.py
Original file line number Diff line number Diff line change
Expand Up @@ -479,17 +479,6 @@ def get_specificity_score(display_name) -> int:
except Exception as ex:
return 0

def sort_key(short_name_a, short_name_b) -> int:
score_a = get_specificity_score(short_name_a)
score_b = get_specificity_score(short_name_b)
if score_a != score_b:
return score_b - score_a
if short_name_a < short_name_b:
return -1
if short_name_a > short_name_b:
return 1
return 0

return sorted(
display_name_to_context_name_map.keys(),
key=lambda name: (-get_specificity_score(name), name),
Expand Down

0 comments on commit 3b2e604

Please sign in to comment.