Remove mypy from the repository - #2482
Merged
Merged
Conversation
Drops mypy as a dev dependency in backend, sdk and penelope, along with its Makefile targets, the commented-out pre-commit hook, docs mentions and .mypy_cache ignore entries. penelope's type-check target now runs pyright, which is already a dev dependency there. It is left out of `make all` because pyright reports 19 pre-existing errors that need clearing first. Type stub packages are kept — pyright uses them too.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
mypy was declared as a dev dependency in three projects but was barely wired in: the pre-commit hook had been commented out, and the only thing actually invoking it was a
type-checkMake target in the backend and penelope. Meanwhile penelope already carries pyright. This removes mypy so there is one type checker story instead of a half-configured second one, and drops the dead references that came with it.What Changed
mypydev dependency fromapps/backend/pyproject.toml,sdk/pyproject.tomlandpenelope/pyproject.toml, and relocked. The backend also dropslibrt, which came in only as a mypy dependency.apps/chatbot,apps/polyphemus,examples/telemetry,agents/research-assistant,agents/travel-agent.type-checkMake target — it only ran mypy — along with its.PHONYandallreferences.type-checktarget now runs pyright, which is already a dev dependency there.mirrors-mypyblock from.pre-commit-config.yaml.penelope/CONTRIBUTING.mdnow names pyright only;apps/chatbot/README.mddrops itsmypy client.py endpoint.pyline..mypy_cache/,.dmypy.jsonanddmypy.jsonignore entries from the root, sdk and penelope.gitignores, from four.dockerignores, and from the skip-list inscripts/run_pip_audit_all.py.Additional Context
type-checkis deliberately not inmake all. pyright reports 19 pre-existing errors in penelope, so wiring it intoallwould hand everyone a red build. The target still works on demand, and a comment in the Makefile records why. Clearing those errors is follow-up work.types-requests,pandas-stubs,types-pytz,types-tqdmin the sdk;types-requestsin penelope). pyright consumes stubs too, so removing them would be a separate, riskier change.agents/visit-prepcould not be relocked. It path-depends on../../../haystack-core-integrations, which is not present in this checkout, souv lockfails on metadata generation. The single stalemypyline was removed by hand — exactly whatuv lockwould have done. A proper relock on a machine that has that repo would be worth doing at some point.exclude-newertimestamp bump,directory→editablesource normalization, andrhesis-sdk 0.11.0 → 0.12.0. Roughly 4 added / 5 removed lines each.Testing
uv lock --checkpasses inapps/backend,sdkandpenelope, confirming the locks match their manifests.grep -rn '\bmypy\b'across the repo returns nothing outsidemypy-extensions, an unrelated transitive package.uvx ruff check scripts/run_pip_audit_all.pypasses — the one Python file touched.make allin the backend and penelope no longer invokes a missing binary.make type-checkin penelope runs pyright and reports the 19 pre-existing errors noted above.