|
30 | 30 | replace_function_definitions_in_module, |
31 | 31 | ) |
32 | 32 | from codeflash.code_utils.code_utils import ( |
33 | | - ImportErrorPattern, |
34 | 33 | cleanup_paths, |
35 | 34 | create_rank_dictionary_compact, |
36 | 35 | diff_length, |
@@ -1612,7 +1611,7 @@ def establish_original_code_baseline( |
1612 | 1611 | ) |
1613 | 1612 |
|
1614 | 1613 | try: |
1615 | | - benchmarking_results = self.run_and_parse_tests( |
| 1614 | + benchmarking_results, _ = self.run_and_parse_tests( |
1616 | 1615 | testing_type=TestingMode.PERFORMANCE, |
1617 | 1616 | test_env=test_env, |
1618 | 1617 | test_files=self.test_files, |
@@ -1949,17 +1948,18 @@ def run_and_parse_tests( |
1949 | 1948 | f"stderr: {run_result.stderr}\n" |
1950 | 1949 | ) |
1951 | 1950 |
|
1952 | | - if is_LSP_enabled(): |
1953 | | - unique_errors = extract_unique_errors(run_result.stdout) |
1954 | | - if unique_errors: |
1955 | | - lsp_log(LspCodeMessage(code="\n".join(unique_errors), file_name="errors")) |
| 1951 | + unique_errors = extract_unique_errors(run_result.stdout) |
1956 | 1952 |
|
1957 | | - if "ModuleNotFoundError" in run_result.stdout: |
| 1953 | + if unique_errors: |
1958 | 1954 | from rich.text import Text |
1959 | 1955 |
|
1960 | | - match = ImportErrorPattern.search(run_result.stdout).group() |
1961 | | - panel = Panel(Text.from_markup(f"⚠️ {match} ", style="bold red"), expand=False) |
1962 | | - console.print(panel) |
| 1956 | + for error in unique_errors: |
| 1957 | + if is_LSP_enabled(): |
| 1958 | + lsp_log(LspCodeMessage(code=error, file_name="errors")) |
| 1959 | + else: |
| 1960 | + panel = Panel(Text.from_markup(f"⚠️ {error} ", style="bold red"), expand=False) |
| 1961 | + console.print(panel) |
| 1962 | + |
1963 | 1963 | if testing_type in {TestingMode.BEHAVIOR, TestingMode.PERFORMANCE}: |
1964 | 1964 | results, coverage_results = parse_test_results( |
1965 | 1965 | test_xml_path=result_file_path, |
|
0 commit comments