Skip to content

Make mypy status honest and establish a path to a green baseline #25

@egillax

Description

@egillax

Running uv run mypy circe --show-error-codes --no-color-output on branch features/ibis-new-design-develop at commit aca1f1a reports:

  • 618 errors
  • 87 files
  • 168 source files checked

Largest error buckets:

  • 132 no-untyped-def
  • 97 attr-defined
  • 21 import-untyped
  • 20 misc
  • 18 unreachable
  • 16 return-value
  • 13 no-any-return

Largest areas:

  • circe/check: 298 errors
  • circe/cohortdefinition: 135 errors
  • circe/execution: 120 errors
  • circe/extensions: 35 errors
  • circe/vocabulary: 9 errors

Main hotspots:

  • circe/check/checkers/range_checker_factory.py
  • circe/check/checkers/concept_set_criteria_check.py
  • circe/check/utils/criteria_name_helper.py
  • circe/check/checkers/duplicates_criteria_check.py
  • circe/cohortdefinition/cohort_expression_query_builder.py
  • circe/execution/ibis/standardize.py
  • circe/execution/ibis/compile_steps.py

The main categories are:

  • missing annotations across older modules
  • dynamic/shared-model typing problems in cohortdefinition
  • checker/factory abstractions in circe/check that type poorly
  • untyped ibis imports in the execution layer
  • a few stale optional-integration issues in chat and extensions

Suggested next steps:

  1. Decide what the supported mypy scope should be in the short term.
  2. Stop advertising a fully green mypy workflow until that is actually true.
  3. Tackle the biggest structural areas first:
    • circe/check
    • circe/cohortdefinition
    • execution-layer ibis typing strategy
  4. Handle optional integrations (chat, extensions) explicitly instead of letting them pollute the baseline.

This issue is meant to make the current status explicit and give us a place to track a realistic path to a green mypy baseline.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions