Skip to content

Commit

Permalink
add @cache
Browse files Browse the repository at this point in the history
  • Loading branch information
yangky11 committed Aug 5, 2024
1 parent 819ed53 commit 44742d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/lean_dojo/data_extraction/lean.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ def cleanse_string(s: Union[str, Path]) -> str:
return str(s).replace("/", "_").replace(":", "_")


@cache
def _to_commit_hash(repo: Union[Repository, Repo], label: str) -> str:
"""Convert a tag or branch to a commit hash."""
if isinstance(repo, Repository): # GitHub repository
Expand Down
4 changes: 2 additions & 2 deletions tests/interaction/test_tactics.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ def test_example_append_subset(batteries_repo: LeanGitRepo) -> None:
thm = Theorem(
batteries_repo,
"Batteries/Data/List/Lemmas.lean",
"List.append_subset",
"List.disjoint_append_left",
)
with Dojo(thm) as (dojo, s0):
s1 = dojo.run_tac(s0, "simp [subset_def, or_imp, forall_and]")
s1 = dojo.run_tac(s0, "simp [Disjoint, or_imp, forall_and]")
assert isinstance(s1, ProofFinished)
assert dojo.is_successful

Expand Down

0 comments on commit 44742d9

Please sign in to comment.