Skip to content

Commit

Permalink
moved comments into a function's docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ZergLev authored Nov 27, 2024
1 parent 865ee0b commit 2855d34
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/switcher_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@

BASE_URL = "https://deeppavlov.github.io/chatsky/"

# Filter function for building latest versions of each major tag.
# For example, out of ["v0.8.0", "v0.8.1", "v0.9.2", "v0.9.3"]
# those would be ["v0.8.1", "v0.9.3"]

def latest_tags_filter(tag_list: list, start_version: str = "v0.8.0") -> list:
"""
Filter function for building latest versions of each major tag.
For example, out of ["v0.8.0", "v0.8.1", "v0.9.2", "v0.9.3"]
those would be ["v0.8.1", "v0.9.3"]
:param tag_list: List of tags to be filtered.
:param start_version: The first version to allow through.
"""
regex = re.compile(r"^v\d+\.\d+\.\d+$")
tag_list = list(filter(regex.match, tag_list))
latest_tags = {}
Expand Down

0 comments on commit 2855d34

Please sign in to comment.