Skip to content

Commit 156e7e2

Browse files
committed
Fix: Less false negatives with validate
1 parent 65e1c46 commit 156e7e2

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

codeclash/games/battlesnake/battlesnake.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ def get_results(self, agents: list[Player], round_num: int, stats: RoundStats):
156156
def validate_code(self, agent: Player) -> tuple[bool, str | None]:
157157
if "main.py" not in agent.environment.execute("ls")["output"]:
158158
return False, "No main.py file found in the root directory"
159-
bot_content = agent.environment.execute("cat main.py")["output"].splitlines()
159+
# note: no longer calling splitlines
160+
bot_content = agent.environment.execute("cat main.py")["output"]
160161
error_msg = []
161162
for func in [
162163
"def info(",

0 commit comments

Comments
 (0)