Skip to content

Replace mypy by pyright#1019

Open
Kludex wants to merge 4 commits into
mainfrom
replace-mypy-by-pyright
Open

Replace mypy by pyright#1019
Kludex wants to merge 4 commits into
mainfrom
replace-mypy-by-pyright

Conversation

@Kludex
Copy link
Copy Markdown
Member

@Kludex Kludex commented Jun 2, 2026

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Docs preview:

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Jun 2, 2026

Merging this PR will not alter performance

✅ 15 untouched benchmarks
⏩ 7 skipped benchmarks1


Comparing replace-mypy-by-pyright (331568f) with main (26dd31e)

Open in CodSpeed

Footnotes

  1. 7 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58f5a056b3

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

try:
if self._uds is None:
kwargs = {
kwargs: dict[str, typing.Any] = {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Initialize retry trace kwargs before the try

With the new pyright gate enabled, this branch-local kwargs declaration still makes the check fail: pyright --help defines the positional arguments as files..., and running pyright src/httpcore2/httpcore2/_async/connection.py reports "kwargs" is possibly unbound at the retry trace on line 148. Because scripts/check now runs pyright over src/httpcore2, the replacement type-check step exits non-zero before the rest of CI can pass; hoist/initialize the retry trace kwargs (or avoid reusing the branch-local variable in the except).

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 35 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread src/httpcore2/httpcore2/_exceptions.py
Comment thread src/httpcore2/httpcore2/_async/connection.py
@Kludex Kludex deployed to cloudflare June 3, 2026 08:44 — with GitHub Actions Active
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