Skip to content

Type the internal modules and make the CI mypy step blocking #350

Description

@alexarje

Follow-up to #345.

The public API is now fully typed (parameter + return annotations on all public methods, plus the shipped `py.typed` marker), and the CI mypy invocation was fixed so it actually runs against our package (it previously aborted on a third-party file).

What remains is the internal backlog: `mypy musicalgestures/` currently reports ~301 errors across ~30 modules (e.g. `cv2` attribute lookups, `Returning Any` from functions declared to return concrete types, untyped internal helpers). Until those are addressed the CI step stays non-blocking (`|| true`).

Tasks

  • Work through the mypy backlog module-by-module (no big-bang change).
  • Add `np.ndarray`/concrete types to internal helpers and fix the `no-any-return` sites.
  • Once the count reaches zero (or a curated allowlist), drop the `|| true` in `.github/workflows/ci.yml` and the noxfile so the type check gates merges.

Notes

  • Shared mypy settings live in `[tool.mypy]` in `pyproject.toml` (`follow_imports=skip`, `exclude` deprecated/3rdparty), so CI and `nox -s typecheck` stay consistent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions