diff --git a/gateway/pyproject.toml b/gateway/pyproject.toml index a804d42..d7e7e73 100644 --- a/gateway/pyproject.toml +++ b/gateway/pyproject.toml @@ -36,3 +36,28 @@ src = ["src"] [tool.pytest.ini_options] asyncio_mode = "auto" testpaths = ["tests"] + +[tool.mypy] +python_version = "3.11" + +# The speech extra is deliberately absent from a default setup. `make setup` +# installs the gateway without it; `make setup-speech` adds faster-whisper and +# piper-tts, which pull several GB of ML wheels for a backend the deployment +# does not use — settings.tts_backend defaults to "speaches", a network call to +# the shared service on 8601. Both imports are lazy, inside the functions that +# need them, so their absence is a runtime fact rather than a defect. +# +# numpy is here for the same reason: nothing depends on it directly, it arrives +# with faster-whisper. +# +# Without these overrides, `make typecheck` fails on a machine that followed the +# documented setup — the pre-push gate turning red for doing the right thing, +# which is how a gate stops being read (T-56). The right assertion is "these +# modules may be absent", not "install several GB so the type checker is happy". +[[tool.mypy.overrides]] +module = [ + "piper", "piper.*", + "faster_whisper", "faster_whisper.*", + "numpy", "numpy.*", +] +ignore_missing_imports = true