Skip to content

Commit

Permalink
refactor: using sets for easier filtering
Browse files Browse the repository at this point in the history
Co-authored-by: Roman Zlobin <[email protected]>
  • Loading branch information
ZergLev and RLKRo authored Nov 27, 2024
1 parent c2a8d9c commit 58a0e28
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions scripts/switcher_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ def generate_version_switcher():
tags = latest_tags_filter(tags, start_version)

# Remove blacklisted tags and add whitelisted tags.
tags = [x for x in tags if x not in blacklisted_tags]
tags = tags + [x for x in whitelisted_tags if x not in tags]
tags = list(set(tags) - set(blacklisted_tags) | set(whitelisted_tags))

# Sort the tags for the version switcher button.
tags.sort(key=lambda x: x.replace("v", "").split("."))
Expand Down

0 comments on commit 58a0e28

Please sign in to comment.