chore: annotate retained ty:ignore comments in middleware#5
Merged
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
🤖 Generated with Claude Code