Skip to content

Commit

Permalink
docs: docstr
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Nov 9, 2023
1 parent 0b75f47 commit ff03621
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions solcx/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,17 @@ def set_solc_version(


def select_pragma_version(pragma_string: str, version_list: List[Version]) -> Optional[Version]:
"""
Get a matching version from the given pragma string and a version list.
Args:
pragma_string (str): A pragma str.
version_list (List[Version]): A list of valid versions.
Returns:
Optional[Version]: A selected version from the given list.
"""

comparator_set_range = pragma_string.replace(" ", "").split("||")
comparator_regex = re.compile(r"(([<>]?=?|\^)\d+\.\d+\.\d+)")
version = None
Expand Down

0 comments on commit ff03621

Please sign in to comment.