chore: adopt mypy 2.1.0 across Python libs#7999
Closed
John Kennedy (jkennedyvz) wants to merge 4 commits into
Closed
chore: adopt mypy 2.1.0 across Python libs#7999John Kennedy (jkennedyvz) wants to merge 4 commits into
John Kennedy (jkennedyvz) wants to merge 4 commits into
Conversation
Bump mypy 1.20.2 -> 2.1.0 in checkpoint, checkpoint-postgres, checkpoint-sqlite, cli, langgraph, prebuilt and sdk-py, and fix the type errors surfaced by the stricter checker. Only mypy and its transitive deps (librt, ast-serialize) change in the lockfiles; no runtime dependencies are bumped. All changes are type-only (annotations, casts, type-ignore adjustments) with no runtime behaviour change. make lint passes in every affected lib. Supersedes dependabot PRs #7969, #7970 and #7974, and removes the mypy portion of the grouped bumps in #7976 and #7972.
0ad74fb to
087e45d
Compare
087e45d to
c72c985
Compare
Collaborator
|
closing since we're migrating to ty |
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
Adopts mypy 1.20.2 → 2.1.0 across all Python libs and fixes the type errors surfaced by the stricter checker. mypy 2.x landed via Dependabot's grouped
majorbumps but brokemake lintin several libs; this PR adopts it cleanly in one place.Only mypy and its transitive deps (
librt,ast-serialize) change in the lockfiles — no runtime dependencies (redis, websockets, starlette, etc.) are touched. Every source change is type-only (annotations,cast,# type: ignoreadjustments) with no runtime behaviour change.Changes by lib
kwargs: dict[str, Any]beforeItem(**kwargs)params: list[Any]annotationcast(...)for theretrydeprecation path instate.py/func(fixes 3 downstreamobjecterrors); cast intochained_futin_runner.py; targeted[arg-type]ignores inbinop.py/funcfor generic/ParamSpec limits; removed now-unused ignores indelta.py/message.pycast("list[Any]", ...); narrowed an over-broadtype: ignorelanggraph.checkpoint.conformance.*test module + return-type annotations on the conformance testsmypy==2.1.0); no source changes neededVerification
make lintpasses in all eight affected libs. Changes are type-only, so the test matrix is exercised by CI.Relationship to open Dependabot PRs