Skip to content

Commit

Permalink
fix: Set default value for Conditional.sum_rows (#934)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-koch authored Apr 16, 2024
1 parent 0bfc9dd commit d69198e
Show file tree
Hide file tree
Showing 4 changed files with 371 additions and 171 deletions.
2 changes: 1 addition & 1 deletion hugr-py/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repository = "https://github.com/CQCL/hugr"

[tool.poetry.dependencies]
python = ">=3.10"
pydantic = "^2.6.4"
pydantic = "~2.7.0"

[tool.pytest.ini_options]
# Lark throws deprecation warnings for `src_parse` and `src_constants`.
Expand Down
4 changes: 3 additions & 1 deletion hugr-py/src/hugr/serialization/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,9 @@ class Conditional(DataflowOp):
op: Literal["Conditional"] = "Conditional"
other_inputs: TypeRow = Field(default_factory=list) # Remaining input types
outputs: TypeRow = Field(default_factory=list) # Output types
sum_rows: list[TypeRow] = Field(description="The possible rows of the Sum input")
sum_rows: list[TypeRow] = Field(
description="The possible rows of the Sum input", default_factory=list
)
# Extensions used to produce the outputs
extension_delta: ExtensionSet = Field(default_factory=list)

Expand Down
Loading

0 comments on commit d69198e

Please sign in to comment.