test: annotate the vector index option suite - #5279
Merged
yanghua merged 1 commit intoAug 25, 2026
Merged
Conversation
Contributor
Author
uv run --extra dev --with 'mypy>=2.3' --with pandas-stubs --with pyarrow-stubs \
--with 'pylance==10.0.0' --with 'ray[data]==2.57.0' --with 'pyarrow==25.0.1' \
-- mypy --strict --follow-imports=silent \
--untyped-calls-exclude=ray --untyped-calls-exclude=lance \
tests/test_vector_index_options.py
# Success: no issues found in 1 source file |
jonasdedden
added a commit
to jonasdedden/lance-ray
that referenced
this pull request
Aug 25, 2026
Adds the [tool.mypy] configuration, the stub packages needed to type the third-party surface, a `typecheck` CI job and a `make typecheck` target. Notes for review: - `python_version` is deliberately unset so it follows the interpreter mypy runs under. Pinning it to 3.10 makes mypy reject numpy 2.5's bundled stubs (`type` statements need >= 3.12); under a real 3.10 install numpy resolves to 2.2 and the run is clean. Verified clean on 3.10, 3.11, 3.12 and 3.13. - Rather than an error-code ignore list that silently decays, the four overrides are scoped to a named upstream cause. `untyped_calls_exclude` and `implicit_reexport` exist because ray/lance ship py.typed but still have unannotated public functions and undeclared re-exports. - uv.lock is refreshed for pyarrow-stubs (20260625 -> 20260819), pylance (10.0.0b7 -> 10.0.0) and ray (2.53.0 -> 2.55.0). The annotations merged in lance-format#5270-lance-format#5279 were written against these; on the previously locked versions mypy reports 13 errors that are purely upstream typing gaps. ray is held at 2.55.0 on purpose: 2.56.0 switched `Dataset.to_pandas()` to Arrow-backed dtypes, which fails two assertions in tests/test_basic_read_write.py and deserves its own PR.
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.
Fixing parts of #65.