fix: narrow Python support and remove Mistral extra#183
Open
StijnGoossens wants to merge 5 commits into
Open
Conversation
The highest-resolution CI lint jobs selected mypy 2.1.0 and failed during the pre-commit mypy hook with an internal error, even though nearby chunks reported "Success: no issues found". Exclude that specific mypy release so highest-resolution jobs resolve to a non-crashing version while preserving future mypy updates.
The CI lint failure was not limited to one mypy release: highest-resolution jobs crashed with mypy 2.1.0 and then 2.0.0, and local pre-commit also reproduced an internal error with mypy 1.20.1. In each failure, pre-commit had split the hook into several 4-file mypy invocations.\n\nRun mypy once over src and tests, and disable filename passing for the hook. This matches the direct project-level mypy invocation, which passes across the tested mypy versions, and avoids chunked partial graph analysis/cache/report interactions.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses CI failures by tightening the declared Python compatibility range, removing an optional dependency extra that can’t currently be resolved from PyPI, and adjusting the pre-commit mypy hook to run a single full-project type check.
Changes:
- Narrow Python requirement in
pyproject.tomlfrom<4.0to<3.14. - Remove the
mistral-ocroptional-dependency extra and update docs/error messages to instruct direct installation ofmistralai. - Update the pre-commit mypy hook to run
mypy src testswithpass_filenames: falseto avoid batch-related mypy failures.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/raglite/_mistral_ocr.py |
Updates ImportError guidance for missing mistralai. |
README.md |
Updates installation instructions for Mistral OCR and minor dev-env wording. |
pyproject.toml |
Narrows Python version range and removes the mistral-ocr extra. |
.pre-commit-config.yaml |
Runs a single project-level mypy check to avoid CI failures. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Keep the mistral-ocr extra as an empty compatibility placeholder so existing raglite[mistral-ocr] install commands keep resolving without pulling the quarantined mistralai package through --all-extras. Also clarify lazy-import errors so users know an incompatible installed mistralai version may need upgrading, not just installation.
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.
This PR fixes multiple CI failures:
<4.0to<3.14.mistral-ocrextra becausemistralaiis currently unavailable/quarantined on PyPI, causinguv sync --all-extrasto fail. The Mistral OCR integration still lazy-importsmistralai; users who need the feature are instructed to installmistralaidirectly.mypy src testsand disables filename passing, so mypy sees the full source/test graph in one invocation. The tradeoff is that local mypy pre-commit runs now always checksrcandtests, though in this repo the single full-project run is still only a few seconds.