Skip to content

fix(types): make strict mypy clean and run it in CI - #13

Merged
Yigtwxx merged 1 commit into
mainfrom
fix/mypy-strict
Oct 1, 2026
Merged

Yigtwxx merged 1 commit into
mainfrom
fix/mypy-strict

Conversation

@Yigtwxx

@Yigtwxx Yigtwxx commented Oct 1, 2026

Copy link
Copy Markdown
Owner

What this changes

  • uv run mypy (strict, src/) is clean. On main it reported 12 errors in 6 files.
  • CI now runs uv run mypy as the last step of the lint job, so type errors can't pile up silently again.
  • Fixes:
    • verify.prepare() reused chosen and found for two different types, so the search-stage pair is renamed worthy / searched.
    • _target is narrowed.
    • The config._coerce Literal branch uses its own name.
    • judge reads entry["id"]. A missing, None or non-numeric id is still skipped.
    • ThemeLike.name is a read-only property, which a frozen Theme satisfies.
    • The suggestions widget's visible property shadowed Textual's own writable visible, so it is renamed showing.
    • One commented # type: ignore[arg-type] remains, for Textual's call_from_thread signature (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 judge id handling.

Checklist

  • ruff check and ruff format --check are clean
  • pytest passes (verify, judge, config and TUI suites run locally)
  • Type annotations on every new function signature
  • No network access in unit tests
  • If a new reported state was added, spec section 15 is updated too (none)
  • This change does not make the tool sound more confident than its evidence

🤖 Generated with Claude Code

https://claude.ai/code/session_01KRNnJrkUuFNdBcR5vXRgTp

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
@vercel

vercel Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
proofpath Ignored Ignored Preview Oct 1, 2026 9:42am UTC

@Yigtwxx
Yigtwxx merged commit 5bf5e0b into main Oct 1, 2026
11 checks passed
@Yigtwxx
Yigtwxx deleted the fix/mypy-strict branch October 1, 2026 09:50
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