Skip to content

The fully_commutes_with_sum property was incorrectly using sum() on the flattened commuting structure, which does not yield a boolean. Changed to use all() to ensure the property returns True only if all sub-encoders fully commute with sum. Added type assertions in tests to verify the return type is boolean.#1286

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_915763952
Jun 1, 2026

Conversation

@copybara-service

Copy link
Copy Markdown

The fully_commutes_with_sum property was incorrectly using sum() on the flattened commuting structure, which does not yield a boolean. Changed to use all() to ensure the property returns True only if all sub-encoders fully commute with sum. Added type assertions in tests to verify the return type is boolean.

@copybara-service
copybara-service Bot force-pushed the test_915763952 branch 2 times, most recently from ef207a1 to e1e683a Compare June 1, 2026 14:40
…on the flattened commuting structure, which does not yield a boolean. Changed to use `all()` to ensure the property returns True only if all sub-encoders fully commute with sum. Added type assertions in tests to verify the return type is boolean.

PiperOrigin-RevId: 924707489
@copybara-service
copybara-service Bot merged commit b607fa3 into master Jun 1, 2026
6 checks passed
@copybara-service
copybara-service Bot deleted the test_915763952 branch June 1, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant