Skip to content

test: fix zip(strict=) py3.9 breakage in tri-comparison reconcile test - #2372

Merged
squid-protocol merged 1 commit into
mainfrom
fix/tri-comparison-reconcile-py39-zip
Aug 28, 2026
Merged

test: fix zip(strict=) py3.9 breakage in tri-comparison reconcile test#2372
squid-protocol merged 1 commit into
mainfrom
fix/tri-comparison-reconcile-py39-zip

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Problem

tests/tools/test_tri_comparison_reconcile.py::test_single_occurrence_name_unchanged
uses zip(line_result[:3], rank_result[:3], strict=True). The strict=
keyword on zip() is Python 3.10+; on 3.9 it raises
TypeError: zip() takes no keyword arguments.

The repo declares requires-python = ">=3.9" and the CI matrix includes
3.9, so this fails full-suite-matrix (*, 3.9) on every open PR (e.g.
#2371) and on main itself.

Fix

_reconcile returns a fixed-shape tuple, so line_result[:3] and
rank_result[:3] are always equal length. Compare them positionally with
list comprehensions — no zip, and flake8-bugbear's B905
(zip-without-explicit-strict) stays satisfied.

Test-only change; no engine/parsing paths touched.

🤖 Generated with Claude Code

test_single_occurrence_name_unchanged used zip(..., strict=True), whose
strict= keyword is Python 3.10+. The repo declares requires-python >=3.9
and the CI matrix runs 3.9, so this raised TypeError: zip() takes no
keyword arguments on every 3.9 job, failing full-suite-matrix on all
open PRs.

_reconcile returns a fixed-shape tuple, so line_result[:3] and
rank_result[:3] are always the same length -- compare them positionally
via list comprehensions instead, which needs no zip and keeps flake8-
bugbear's B905 (zip-without-strict) satisfied.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-protocol
squid-protocol merged commit 650dcee into main Aug 28, 2026
28 checks passed
@squid-protocol
squid-protocol deleted the fix/tri-comparison-reconcile-py39-zip branch August 28, 2026 12:45
@squid-protocol squid-protocol added testing Unit, integration, and E2E pipeline verification python Python-specific runtime or environment optimizations labels Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Python-specific runtime or environment optimizations testing Unit, integration, and E2E pipeline verification

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant