Skip to content

chore: annotate retained ty:ignore comments in middleware#5

Merged
lesnik512 merged 2 commits into
mainfrom
chore/post-migration-polish
Jun 4, 2026
Merged

chore: annotate retained ty:ignore comments in middleware#5
lesnik512 merged 2 commits into
mainfrom
chore/post-migration-polish

Conversation

@lesnik512

@lesnik512 lesnik512 commented Jun 4, 2026

Copy link
Copy Markdown
Member

Summary

Add one-line rationale comments above the two retained
`# ty: ignore[invalid-argument-type]` sites in
`modern_di_faststream/main.py`. Both ignores were re-verified during
PR #4 (ty still fires `invalid-argument-type` on faststream 0.7.1 if
either is removed). The reason is non-obvious — both stem from
upstream structural type frictions our shim layer can't paper over —
so contributors who land on these sites get the WHY inline instead
of having to re-derive it from upstream's signatures.

History

This PR originally also tightened `uv_build` from `<1.0` to
`<0.12`. That change was reverted in the second commit: `uv_build`
is build-time only and doesn't propagate to downstream installers,
so tightening preemptively just creates churn at every minor bump
without buying user-facing protection.

Test plan

  • `just lint` clean.
  • `just test` green at 100% coverage.

🤖 Generated with Claude Code

Two small follow-ups to the faststream 0.7 migration (PRs #3, #4):

1. Narrow uv_build's upper bound from <1.0 to <0.12, matching upstream's
   stated versioning policy (the 0.x component is where breaking changes
   ship, not the major). Floor moves from 0.11 to 0.11.18 — the release
   where uv_build was stabilized. Same posture the migration just
   adopted for faststream: bound on both sides.

2. Add one-line rationale comments above the two retained
   '# ty: ignore[invalid-argument-type]' sites in main.py. Both
   ignores were re-verified during PR2 (ty still fires the error on
   0.7.1 if removed). The WHY is non-obvious — both stem from upstream
   structural type frictions that can't be solved at this layer —
   so a future contributor should not optimistically delete them
   without understanding the constraint.

No behavior change. lint + tests green at 100% coverage.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 self-assigned this Jun 4, 2026
uv_build is a build-time dependency — [build-system].requires only
affects whoever runs `uv build`, not downstream installers. A breaking
uv_build 0.12 surfaces as a single failing build, recoverable in one
commit at that time. Tightening preemptively just creates churn at
every minor bump with no user-facing protection in exchange.

PR #5 now ships annotations-only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lesnik512 lesnik512 changed the title chore: tighten uv_build pin and annotate retained ty:ignore comments chore: annotate retained ty:ignore comments in middleware Jun 4, 2026
@lesnik512 lesnik512 merged commit 722b6c6 into main Jun 4, 2026
6 checks passed
@lesnik512 lesnik512 deleted the chore/post-migration-polish branch June 4, 2026 07:33
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