Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Set default value for Conditional.sum_rows #934

Merged
merged 5 commits into from
Apr 16, 2024
Merged
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 hugr-py/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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`.
4 changes: 3 additions & 1 deletion hugr-py/src/hugr/serialization/ops.py
Original file line number Diff line number Diff line change
@@ -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)

Loading
Loading