Skip to content

Commit ca4a194

Browse files
Merge pull request #696 from codeflash-ai/codeflash/optimize-pr695-2025-08-29T14.38.33
⚡️ Speed up function `test_confidence_threshold_not_met_error` by 64% in PR #695 (`enhancement/codeflash-errors`)
2 parents 4bd9e25 + 46261d1 commit ca4a194

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

codeflash/errors/errors.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
from codeflash.code_utils.compat import LF
44
from codeflash.either import CodeflashError
55

6+
_TEST_CONFIDENCE_ERROR = CodeflashError(
7+
"TEST_CONFIDENCE_THRESHOLD_NOT_MET_ERROR", "The threshold for test confidence was not met."
8+
)
9+
610
_BEHAVIORAL_TEST_FAILURE_ERROR = CodeflashError(
711
"BEHAVIORAL_TEST_FAILURE_ERROR", "Failed to establish a baseline for the original code - bevhavioral tests failed."
812
)
@@ -74,7 +78,7 @@ def coverage_threshold_not_met_error() -> CodeflashError:
7478

7579

7680
def test_confidence_threshold_not_met_error() -> CodeflashError:
77-
return CodeflashError("TEST_CONFIDENCE_THRESHOLD_NOT_MET_ERROR", "The threshold for test confidence was not met.")
81+
return _TEST_CONFIDENCE_ERROR
7882

7983

8084
def behavioral_test_failure_error() -> CodeflashError:

0 commit comments

Comments
 (0)