Skip to content

Commit

Permalink
Minor updates for PythonInterpreter
Browse files Browse the repository at this point in the history
  • Loading branch information
okhat committed Dec 26, 2024
1 parent baed59f commit c89166f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions dspy/primitives/python_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ class PythonInterpreter:
Prerequisites:
- Deno (https://docs.deno.com/runtime/getting_started/installation/).
- runner.js in the same directory as this file.
Example Usage:
```python
Expand Down Expand Up @@ -53,7 +52,9 @@ def _ensure_deno_process(self) -> None:
install_instructions = (
"Deno executable not found. Please install Deno to proceed.\n"
"Installation instructions:\n"
"curl -fsSL https://deno.land/install.sh | sh\n"
"> curl -fsSL https://deno.land/install.sh | sh\n"
"*or*, on macOS with Homebrew:\n"
"> brew install deno\n"
"For additional configurations: https://docs.deno.com/runtime/getting_started/installation/"
)
raise InterpreterError(install_instructions) from e
Expand Down
2 changes: 1 addition & 1 deletion tests/primitives/test_python_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def test_execute_simple_code():
interpreter = PythonInterpreter()
code = "print('Hello, World!')"
result = interpreter.execute(code)
assert result == 'Hello, World!', "Simple print statement should return 'Hello World!'"
assert result == 'Hello, World!\n', "Simple print statement should return 'Hello World!\n'"

def test_import():
interpreter = PythonInterpreter()
Expand Down

0 comments on commit c89166f

Please sign in to comment.