Skip to content

Commit 47dfc3c

Browse files
small fixes
1 parent aab0aa4 commit 47dfc3c

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

codeflash/lsp/lsp_logger.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def extract_tags(msg: str) -> tuple[Optional[LspMessageTags], str]:
3939
parts = msg.split("|tags|")
4040
if len(parts) == 2:
4141
message_tags = LspMessageTags()
42-
# Use set for O(1) lookups and remove whitespace in a single pass
4342
tags = {tag.strip() for tag in parts[0].split(",")}
4443
if "!lsp" in tags:
4544
message_tags.not_lsp = True

codeflash/lsp/lsp_message.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@dataclass
1515
class LspMessage:
1616
# to show a loading indicator if the operation is taking time like generating candidates or tests
17-
takes_time: bool = field(default=False, kw_only=True)
17+
takes_time: bool = field(default=False)
1818

1919
def _loop_through(self, obj: Any) -> Any: # noqa: ANN401
2020
if isinstance(obj, list):
@@ -35,8 +35,9 @@ def serialize(self) -> str:
3535
# Important: keep type as the first key, for making it easy and fast for the client to know if this is a lsp message before parsing it
3636
ordered = {"type": self.type(), **data}
3737
return (
38-
json.dumps(ordered) + "\u241f"
39-
) # \u241F is the message delimiter becuase it can be more than one message sent over the same message
38+
json.dumps(ordered)
39+
+ "\u241f" # \u241F is the message delimiter becuase it can be more than one message sent over the same message, so we need something to separate each message
40+
)
4041

4142

4243
@dataclass

codeflash/optimization/function_optimizer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ def find_and_process_best_optimization(
12411241
)
12421242

12431243
if best_optimization:
1244-
logger.info("h2|tags|Best candidate 🚀:")
1244+
logger.info("h2|tags|Best candidate 🚀")
12451245
code_print(best_optimization.candidate.source_code.flat)
12461246
processed_benchmark_info = None
12471247
if self.args.benchmark:

codeflash/result/critic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
MIN_IMPROVEMENT_THRESHOLD,
1010
MIN_TESTCASE_PASSED_THRESHOLD,
1111
)
12-
from codeflash.models.models import TestType
12+
from codeflash.models.test_type import TestType
1313

1414
if TYPE_CHECKING:
1515
from codeflash.models.models import CoverageData, OptimizedCandidateResult, OriginalCodeBaseline

0 commit comments

Comments
 (0)