Skip to content

Add tests/ to CI mypy invocation and fix test type errors #86

@dgenio

Description

@dgenio

Context

PR #84 added strict mypy checking for chainweaver/ and includes a [[tool.mypy.overrides]] for tests.* (relaxing disallow_untyped_defs). However, CI only runs mypy chainweaver/, so the override is not exercised — mypy emits a benign Warning: unused section(s) (exit 0).

What to do

  1. Expand the CI mypy invocation to include tests/: python -m mypy chainweaver/ tests/
  2. Fix the 10 [type-arg] errors in test files (bare dictdict[str, Any] in tests/helpers.py and tests/test_flow_execution.py)
  3. Once tests/ is included, the tests.* override will be exercised and the benign warning disappears.

Why

The tests.* override in pyproject.toml is currently present but unused in CI. Adding tests/ to the mypy invocation makes it active, eliminates the warning, and provides type-checking coverage for test code.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-friendlyDesigned for AI-assisted implementationtype:refactorCode restructuring without behavior change

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions