Repository navigation
fix(types): make strict mypy clean and run it in CI - #13
Merged
Merged
Conversation
Twelve errors had piled up on main because CI never ran mypy. All were false positives or stub limits: two variables reused for different types in prepare(), a Protocol attribute a frozen dataclass could not satisfy, and the suggestions widget shadowing Textual's own visible property (renamed showing). One Textual call_from_thread signature keeps a commented ignore. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KRNnJrkUuFNdBcR5vXRgTp
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
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.
What this changes
uv run mypy(strict,src/) is clean. On main it reported 12 errors in 6 files.uv run mypyas the last step of thelintjob, so type errors can't pile up silently again.verify.prepare()reusedchosenandfoundfor two different types, so the search-stage pair is renamedworthy/searched._targetis narrowed.config._coerceLiteral branch uses its own name.judgereadsentry["id"]. A missing,Noneor non-numeric id is still skipped.ThemeLike.nameis a read-only property, which a frozenThemesatisfies.visibleproperty shadowed Textual's own writablevisible, so it is renamedshowing.# type: ignore[arg-type]remains, for Textual'scall_from_threadsignature (a stub limit, reproduced standalone).Why
CI never ran mypy, so errors had been accumulating on main. No behaviour change. An independent reviewer approved the change after checking each rename and the
judgeid handling.Checklist
ruff checkandruff format --checkare cleanpytestpasses (verify, judge, config and TUI suites run locally)🤖 Generated with Claude Code
https://claude.ai/code/session_01KRNnJrkUuFNdBcR5vXRgTp