Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pdl/pdl_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,4 @@ def add_done_callback(
case IndependentContext(context=c):
p.context = PdlApply(f, c)
case _:
assert False
assert False, f"Unexpected context type {type(p)}: {p}"
22 changes: 12 additions & 10 deletions src/pdl/pdl_interpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2146,16 +2146,18 @@ def process_call_code(
case "ipython":
try:
result = call_ipython(code_s, scope)
background = PdlList(
[
PdlDict( # type: ignore
{
"role": state.role,
"content": lazy_apply(str, result),
"pdl__defsite": block.pdl__id,
},
),
], # type: ignore
background = SingletonContext(
PdlList(
[
PdlDict( # type: ignore
{
"role": state.role,
"content": lazy_apply(str, result),
"pdl__defsite": block.pdl__id,
},
),
], # type: ignore
)
)
except KeyboardInterrupt as exc:
raise exc from exc
Expand Down