Conversation
Co-authored-by: karlicoss <291333+karlicoss@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Upgrade ty type checker to latest version, and remove unnecessary ty: ignore if any
Upgrade ty type checker to latest version and fix mypy configuration
Sep 23, 2025
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #479 +/- ##
=======================================
Coverage 83.00% 83.00%
=======================================
Files 71 71
Lines 5253 5253
Branches 145 145
=======================================
Hits 4360 4360
Misses 748 748
Partials 145 145
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
This PR upgrades the
tytype checker to the latest available version and fixes an invalid error code in the mypy configuration that was causing warnings.Changes Made
Type Checker Upgrade
tydependency from>=0.0.1a20to>=0.0.1a21(latest version) inpyproject.tomlMypy Configuration Fix
deprecatederror code frommypy.inithat was causing warnings during type checkingAnalysis of Existing
ty: ignoreCommentsDuring this upgrade, I thoroughly analyzed all existing
ty: ignorecomments to determine if they could be removed. After testing with both type checkers, all existing ignore comments are still necessary:src/promnesia/cannon.py: Thety: ignore[invalid-return-type]comment addresses a known false positive in ty where it incorrectly thinksurlunsplit()returnsbytesinstead ofstr(see ty issue #733)src/promnesia/logging.py: Thety: ignore[invalid-assignment]andty: ignore[missing-argument]comments are legitimately needed for method assignment operations that both type checkers correctly flag as violationsVerification
Both
mypyandtynow pass type checking without configuration warnings:The changes are minimal and maintain backward compatibility while ensuring the project uses the latest type checking tools.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.