Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[CI] MyPy gate is mostly disabled: `ignore_errors` on 37 modules (all UI/CLI/main) hides 196 errors, including real crash bugs

Open
#740 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
github-actions, python

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

enhancement ready-for-human

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_quit overrides 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 indexable in handle_undo_command
  • app/ui/tui.py:7796-7890: ten Item "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 the ignore_errors override)
  • .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_errors with per-module ratcheting: enable checking for app.ui.tui and app.main first, fix or # type: ignore[code] the existing errors, and turn on warn_unused_ignores and check_untyped_defs for new code.
  • At minimum, enable the attr-defined, unused-coroutine and override error codes everywhere. They found real bugs here.
  • Optionally add ruff format --check to static-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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fderuiter/sortify

All issues in fderuiter/sortify

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.