Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
yangky11 committed Sep 18, 2024
1 parent c1efbf6 commit cef522f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lean_dojo/data_extraction/lean.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,11 @@ def get_lean4_version_from_config(toolchain: str) -> str:
"""Return the required Lean version given a ``lean-toolchain`` config."""
m = _LEAN4_VERSION_REGEX.fullmatch(toolchain.strip())
assert m is not None, "Invalid config."
return m["version"]
v = m["version"]
if not v.startswith("v"):
assert v[0].isnumeric()
v = "v" + v
return v


def get_lean4_commit_from_config(config_dict: Dict[str, Any]) -> str:
Expand Down

0 comments on commit cef522f

Please sign in to comment.