Repository navigation
fix: annotate the headers dict so the type check passes - #192
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 51 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codecov Report✅ All modified and coverable lines are covered by tests.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 Approval recommended
The explicit dict[str, str] annotation addresses the reported type-checking failure while preserving existing runtime behavior.
No open issues 🎉
What changed in this PR
This PR fixes the type-checking failure in BaseClientWrapper.get_headers by explicitly declaring the headers mapping as dict[str, str], with no runtime behavior changes.
Changes:
- Annotates the headers dictionary as
dict[str, str]. - Preserves existing authentication, custom-header, and User-Agent behavior.
| File | Description |
|---|---|
| src/fishaudio/core/client_wrapper.py | Adds an explicit dict[str, str] annotation to the headers dictionary in get_headers. |
Review effort: Lite
mainfailsty checksince #187 and #189 were both merged: with the API key now a plainstrresult of.strip(), the headers dict inget_headersis inferred asdict[str, LiteralString], and assigning the User-Agent to it is rejected. Annotating the dict asdict[str, str]fixes it. No behaviour change.#189 was merged while its type check was failing; that was my mistake.
poe checkand the full test suite pass on this branch.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.