[CI] MyPy gate is mostly disabled: `ignore_errors` on 37 modules (all UI/CLI/main) hides 196 errors, including real crash bugs
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with the [tool.mypy] settings in pyproject.toml and the static-checks job in .github/workflows/ci.yml; reproduce the reported 196 errors by running uv run mypy app/ without the module overrides. The issue identifies stale entries and several real errors, but ratcheting checks across 20 files requires project familiarity. Done means the CI type check catches the targeted error classes and the reported crash bugs are addressed.
Written by the indexing model from the issue text.
Description
Summary
The "Type Check (MyPy)" job passes because pyproject.toml sets ignore_errors = true for 37 modules. Those include app.ui.*, app.cli.*, app.main, app.core.db, db_conn, session, daemon, analyzer and path_utils. With that override removed, mypy reports 196 errors in 20 files. Some of them are real runtime bugs that have shipped:
app/ui/tui.py:5969:"QuarantineVaultModal" has no attribute "push_screen". The Release button crashes; see #733.app/ui/tui.py:8338/8342:action_quitoverrides an async method and drops the coroutine, so Ctrl+Q does nothing; see #731.app/core/daemon.py:618:Incompatible return value type (got "AppSession | None", expected "AppSession")app/main.py:1119-1121:Value of type "Any | None" is not indexableinhandle_undo_commandapp/ui/tui.py:7796-7890: tenItem "None" ... has no attribute "get"errors in plan-handling code
Six entries in the override list point at modules that no longer exist, left over from the move to app/plugins/clinical_compliance: app.core.clinical_compliance, clinical_renamer, clinical_strategy, clinical_taxonomy, cro_multi_study_pipeline and study_disambiguator. The plugin modules that replaced them are now checked only in default non-strict mode. Most function bodies are skipped anyway because they are untyped ("By default the bodies of untyped functions are not checked").
Location
pyproject.toml:72-118([tool.mypy]and theignore_errorsoverride).github/workflows/ci.yml:55-78
Evidence / reproduction
$ uv run mypy app/ # CI config
Success: no issues found in 78 source files
$ uv run mypy --config-file <same [tool.mypy] without the overrides block> app/
Found 196 errors in 20 files (checked 78 source files)
42 app/ui/tui.py
32 app/core/analyzer.py
20 app/core/shared_registry.py
19 app/core/semantic_embeddings.py
17 app/core/analyzer_strategies.py
12 app/core/db_conn.py ...
ruff check . passes cleanly, but ruff format --check . reports 69 files that would be reformatted. Formatting is not enforced in CI.
Expected vs actual
- Expected: the type-check job catches attribute errors and unawaited coroutines in the UI and CLI.
- Actual: those modules are excluded wholesale, so the job always passes.
Suggested fix
- Delete the six stale module entries.
- Replace the blanket
ignore_errorswith per-module ratcheting: enable checking forapp.ui.tuiandapp.mainfirst, fix or# type: ignore[code]the existing errors, and turn onwarn_unused_ignoresandcheck_untyped_defsfor new code. - At minimum, enable the
attr-defined,unused-coroutineandoverrideerror codes everywhere. They found real bugs here. - Optionally add
ruff format --checktostatic-checks.
Severity
medium
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 10h 10m
- Merged PRs (30d)
- 420
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fderuiter/sortify
-
bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
architecture enhancement ready-for-agent
Difficulty 5/5 Over a week Newbie friendliness 35/100
fderuiter/sortify#783 · 1 comment ·
Maintainers usually reply within 1 day
-
architecture enhancement ready-for-human
Difficulty 5/5 Over a week Newbie friendliness 25/100
fderuiter/sortify#726 · 1 comment ·
Maintainers usually reply within 1 day
-
architecture enhancement ready-for-human
Difficulty 5/5 Over a week Newbie friendliness 25/100
fderuiter/sortify#723 · 1 comment ·
Maintainers usually reply within 1 day
-
architecture enhancement ready-for-agent
Difficulty 5/5 Over a week Newbie friendliness 30/100
fderuiter/sortify#714 · 2 comments ·
Maintainers usually reply within 1 day
All issues in fderuiter/sortify
Similar issues
-
[Bug]: `hermes plugins update` clones an entire monorepo twice - `subdir` is resolved but dropped at both catalog-update call sitesPossibly taken @HootRock claimed this today. Opencomp/cli P2 type/perf
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
NousResearch/hermes-agent#142417 · 2 comments ·
Maintainers usually reply within 1 day
-
bug enhancement python
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
DewaldOosthuizen/tech-cheat-sheets-and-notes#392 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug p2
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Restore postgresql_vm_test_charm actions.yaml change (removed in canonical/postgresql-operator#2054)Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
canonical/postgresql-single-kernel-library#390 · 1 comment ·
Maintainers usually reply within 2 days