Skip to content

Commit 2ba92d7

Browse files
authored
Contributed values are expressions (#754)
1 parent 9aeb4a9 commit 2ba92d7

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/pdl/pdl-schema.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,9 +1407,19 @@
14071407
"additionalProperties": false,
14081408
"properties": {
14091409
"value": {
1410-
"items": {},
1411-
"title": "Value",
1412-
"type": "array"
1410+
"anyOf": [
1411+
{
1412+
"items": {},
1413+
"type": "array"
1414+
},
1415+
{
1416+
"type": "string"
1417+
},
1418+
{
1419+
"$ref": "#/$defs/LocalizedExpression_TypeVar_"
1420+
}
1421+
],
1422+
"title": "Value"
14131423
}
14141424
},
14151425
"required": [

src/pdl/pdl_ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ class ContributeTarget(StrEnum):
175175

176176

177177
class ContributeValue(BaseModel):
178-
value: list[Any]
178+
value: ExpressionType[list[Any]]
179179
model_config = ConfigDict(extra="forbid")
180180

181181

0 commit comments

Comments
 (0)