From cef522f1a2539271e1451402e7d99e39a1e17f6c Mon Sep 17 00:00:00 2001 From: Kaiyu Yang Date: Wed, 18 Sep 2024 01:56:11 +0000 Subject: [PATCH] minor fix --- src/lean_dojo/data_extraction/lean.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lean_dojo/data_extraction/lean.py b/src/lean_dojo/data_extraction/lean.py index 45648d0..b140c07 100644 --- a/src/lean_dojo/data_extraction/lean.py +++ b/src/lean_dojo/data_extraction/lean.py @@ -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: