Skip to content

Commit e4ca67c

Browse files
committed
cache results for future calls
1 parent 1f31b08 commit e4ca67c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

codeflash/code_utils/config_parser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from __future__ import annotations
22

3+
from functools import cache
34
from pathlib import Path
45
from typing import Any
56

67
import tomlkit
78

89

10+
@cache
911
def find_pyproject_toml(config_file: Path | None = None) -> Path:
1012
# Find the pyproject.toml file on the root of the project
1113

@@ -31,6 +33,7 @@ def find_pyproject_toml(config_file: Path | None = None) -> Path:
3133
raise ValueError(msg)
3234

3335

36+
@cache
3437
def find_conftest_files(test_paths: list[Path]) -> list[Path]:
3538
list_of_conftest_files = set()
3639
for test_path in test_paths:

0 commit comments

Comments
 (0)