Skip to content

mypy --strict CI gate skips tools/ and the root conftest.py #46

@OmarAlJarrah

Description

@OmarAlJarrah

Problem

The CI type-check gate runs uv run mypy --strict, which resolves to the [tool.mypy] files = [...] list in pyproject.toml. That list enumerates only packages/*/src and packages/*/tests; it omits tools/ and the workspace-root conftest.py, both of which are first-party, fully annotated Python. As a result those files are never type-checked by the gate, so a future type regression in tools/surface_snapshot.py or conftest.py would land green. (Ruff already covers tools/, so only the type gate has the hole.)

Where

pyproject.toml [tool.mypy] files:

files = [
    "packages/dexpace-sdk-core/src",
    "packages/dexpace-sdk-core/tests",
    ...
    "packages/dexpace-sdk-http-requests/src",
    "packages/dexpace-sdk-http-requests/tests",
]

tools/ and conftest.py are absent. CI invokes the gate as uv run mypy --strict (no explicit paths), so it uses exactly this list. Running mypy --strict tools/surface_snapshot.py directly passes today — the code is clean; it is simply outside the gate.

Impact

A type regression in the surface-snapshot tooling or the root test fixture would not fail CI, despite the project's stated mypy --strict-clean convention applying to all first-party source.

Suggested fix

Add tools and conftest.py to the [tool.mypy] files list (extending mypy_path if needed for import resolution), so the strict gate covers all first-party Python. Alternatively, add an extra CI step that runs uv run mypy --strict tools conftest.py.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions