Repository navigation
NAS-145295 / 27.1.0 / Switch to mypy (by yocalebo) - #112
Merged
Merged
Conversation
Pytype is no longer developed and does not support Python 3.13, and it is slow. The type check now runs mypy on Python 3.13. The job keeps the name type-check so existing required checks still match. The pytype comments in the code are removed or replaced with their mypy equivalent. (cherry picked from commit fa98d17)
Author
|
Automatic cherry-pick failed. Please resolve conflicts by running: If the original PR was merged via a squash, you can just cherry-pick the squashed commit: |
Author
Mypy found errors that pytype did not report. Most were missing or loose annotations. The JSON-RPC message types are now final so mypy can narrow them by key, and an error response id may be None as JSON-RPC allows. One fix changes behavior. When the server sends a global error that the client cannot parse, pending calls now raise a ClientException instead of quietly returning None. (cherry picked from commit a66d86d)
By default mypy skips the bodies of functions that have no type annotations, and pytype checked them. Mypy now checks them too, which found more errors in the package and the tests. This commit fixes them without changing runtime behavior. (cherry picked from commit 15d440c)
yocalebo
marked this pull request as ready for review
November 17, 2026 17:20
yocalebo
approved these changes
Nov 17, 2026
Author
|
This PR has been merged and conversations have been locked. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
pytype is dead (also miserably slower compared to mypy)
Original PR: #111