Skip to content

test: annotate the vector index option suite - #5279

Merged
yanghua merged 1 commit into
lance-format:mainfrom
jonasdedden:typing/tests-vector-index-options
Aug 25, 2026
Merged

test: annotate the vector index option suite#5279
yanghua merged 1 commit into
lance-format:mainfrom
jonasdedden:typing/tests-vector-index-options

Conversation

@jonasdedden

Copy link
Copy Markdown
Contributor

Fixing parts of #65.

@jonasdedden

Copy link
Copy Markdown
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

@yanghua
yanghua merged commit d629673 into lance-format:main Aug 25, 2026
4 checks passed
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants