Skip to content

Commit 516c6a8

Browse files
committed
fix: typing of pdl_context in notebook extension
Signed-off-by: Louis Mandel <[email protected]>
1 parent 51e66de commit 516c6a8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/pdl/pdl_notebook_ext.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77

88
from .pdl import InterpreterConfig, exec_str
99
from .pdl_ast import get_default_model_parameters
10+
from .pdl_context import DependentContext
1011
from .pdl_dumper import block_to_dict
11-
from .pdl_lazy import PdlDict, PdlList
12+
from .pdl_lazy import PdlDict
1213

1314

1415
@magics_class
@@ -33,10 +34,12 @@ def pdl(self, line, cell, local_ns):
3334
line = line.strip()
3435
args = parse_argstring(self.pdl, line)
3536
if args.reset_context:
36-
scope = local_ns | {"pdl_context": PdlList([])}
37+
scope = local_ns | {"pdl_context": DependentContext([])}
3738
else:
3839
# local_ns won't be lazy; make it lazy again
39-
scope = local_ns | {"pdl_context": PdlList(local_ns.get("pdl_context", []))}
40+
scope = local_ns | {
41+
"pdl_context": local_ns.get("pdl_context", DependentContext([]))
42+
}
4043

4144
if "pdl_model_default_parameters" not in scope:
4245
scope["pdl_model_default_parameters"] = get_default_model_parameters()

0 commit comments

Comments
 (0)