Skip to content

Commit fc0a901

Browse files
authored
fix to call args type (#225)
Signed-off-by: Mandana Vaziri <[email protected]>
1 parent b0ac15b commit fc0a901

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

src/pdl/pdl-schema.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,9 +1446,6 @@
14461446
{},
14471447
{
14481448
"$ref": "#/$defs/LocalizedExpression"
1449-
},
1450-
{
1451-
"type": "object"
14521449
}
14531450
],
14541451
"default": {},

src/pdl/pdl_ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ class CallBlock(Block):
165165
call: ExpressionType
166166
"""Function to call.
167167
"""
168-
args: ExpressionType | dict[str, Any] = {}
168+
args: ExpressionType = {}
169169
"""Arguments of the function with their values.
170170
"""
171171
# Field for internal use

src/pdl/pdl_ast_utils.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,7 @@ def map_block_children(f: MappedFunctions, block: BlockType) -> BlockType:
134134
block.returns = f.f_block(block.returns)
135135
case CallBlock():
136136
block.call = f.f_expr(block.call)
137-
if isinstance(block.args, dict):
138-
block.args = {x: f.f_expr(e) for x, e in block.args.items()}
139-
else:
140-
block.args = f.f_expr(block.args)
137+
block.args = f.f_expr(block.args)
141138
if block.trace is not None:
142139
block.trace = f.f_block(block.trace)
143140
case BamModelBlock() | LitellmModelBlock():

0 commit comments

Comments
 (0)