build(mypy): ignore missing stubs for sentence_transformers#95
Open
RobertSigmundsson wants to merge 1 commit into
Open
build(mypy): ignore missing stubs for sentence_transformers#95RobertSigmundsson wants to merge 1 commit into
RobertSigmundsson wants to merge 1 commit into
Conversation
sentence_transformers is an optional runtime dep (guarded by try/except ImportError in reranker.py and semantic_discovery.py) not installed in the test venv, so mypy reported import-not-found. Add it to the existing ignore_missing_imports override list (CS-1) so the fork's mypy gate is fully green without touching the optional-import guards. (cherry picked from commit 36a7e47) (cherry picked from commit 92b6577)
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.
Problem
sentence_transformersships no type stubs. It is absent from the existing[[tool.mypy.overrides]]block that already listsnetworkx.*,chromadb.*,openpyxl.*,google.genai.*andwatchdog.*— so in any environment where the package is installed,mypyreports import errors for it while every comparable dependency is exempt.
Change
One line in
pyproject.toml:Why upstream benefits
Consistency with every other stub-less optional dependency already handled the same way, and a clean
mypyrun for contributors who have the package installed.Evidence
origin/mainimport surreal_memoryruff checkruff format --checkmypy src/ --ignore-missing-importspytest -m "not stress" -n autoRisks / notes for the reviewer
installed; the change only matters where it is.
mypyon any branch thatimports
sentence_transformers.