Skip to content

fix(quic): satisfy mypy 2.2 comparison-overlap in stream read loop#1374

Merged
acul71 merged 1 commit into
mainfrom
fix/quic-stream-mypy-comparison-overlap
Jul 8, 2026
Merged

fix(quic): satisfy mypy 2.2 comparison-overlap in stream read loop#1374
acul71 merged 1 commit into
mainfrom
fix/quic-stream-mypy-comparison-overlap

Conversation

@acul71

@acul71 acul71 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes main CI lint failure (tox * lint) caused by mypy 2.2 comparison-overlap in QUICStream.read()
  • Replaces direct self._state == StreamState.RESET in the read wait loop with self.is_reset() — same runtime behavior, mypy-safe

Closes #1373

Problem

After #1372 merged, main lint jobs failed on a pre-existing QUIC stream check (unrelated to interop changes). CI resolves mypy 2.2.0; local dev envs on mypy 1.x did not catch it.

Test plan

  • make lint / make typecheck with mypy 2.2.0
  • pytest tests/core/transport/quic/ (140 passed, including new regression test)
  • make linux-docs
  • Local baseline on ad1eb6ae (main before fix(interop): handle IPv6-only multiaddrs in _get_ip_value #1372): make test — 3047 passed, 1 failed (test_gossipsub_identify_aware_publish.py::test_publish_before_identify_completes), 23 skipped; no regressions introduced by this PR

Made with Cursor

Use is_reset() in the QUICStream.read() wait loop so concurrent peer
resets remain detectable without tripping mypy 2.2 comparison-overlap
after the entry state guard.

Fixes #1373

Co-authored-by: Cursor <cursoragent@cursor.com>
@acul71 acul71 merged commit cb8215d into main Jul 8, 2026
38 checks passed
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.

CI lint: mypy 2.2 comparison-overlap in QUIC stream read loop

1 participant