Skip to content

fix: annotate the headers dict so the type check passes - #192

Merged
lumpinif merged 1 commit into
mainfrom
fix/get-headers-type
Nov 27, 2026
Merged

lumpinif merged 1 commit into
mainfrom
fix/get-headers-type

Conversation

@lumpinif

@lumpinif lumpinif commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

main fails ty check since #187 and #189 were both merged: with the API key now a plain str result of .strip(), the headers dict in get_headers is inferred as dict[str, LiteralString], and assigning the User-Agent to it is rejected. Annotating the dict as dict[str, str] fixes it. No behaviour change.

#189 was merged while its type check was failing; that was my mistake. poe check and the full test suite pass on this branch.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Copilot AI lite review requested due to automatic review settings November 27, 2026 04:41
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T04:42:24.071985Z f35766c PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Nov 27, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You'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.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3ff16f84-1333-4159-abad-0b92406a3559
Commits

Reviewing files that changed from the base of the PR and between afb406a and f35766c.

Files selected for processing: 1

  • src/fishaudio/core/client_wrapper.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@codecov

codecov Bot commented Nov 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
src/fishaudio/core/client_wrapper.py 92.81% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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

@lumpinif
lumpinif merged commit bcae77a into main Nov 27, 2026
28 checks passed
@lumpinif
lumpinif deleted the fix/get-headers-type branch November 27, 2026 04:44
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.

2 participants