Skip to content

utils: silence mypy on pa.nulls() abstract-DataType overload#12

Merged
rustyconover merged 1 commit into
mainfrom
fix/utils-mypy-pyarrow-nulls
May 18, 2026
Merged

utils: silence mypy on pa.nulls() abstract-DataType overload#12
rustyconover merged 1 commit into
mainfrom
fix/utils-mypy-pyarrow-nulls

Conversation

@rustyconover
Copy link
Copy Markdown
Collaborator

Summary

Unblocks the CI Lint job, which has been failing on every PR (including main) since pyarrow's stubs tightened the `nulls()` overload set.

The stubs declare one overload per concrete `DataType` subtype (`Int8Type`, `StringType`, ...) but no overload for the abstract `DataType` base. `_empty_array` accepts `pa.DataType` because callers pass arbitrary inferred Arrow types; the runtime behaviour is correct for every concrete subtype, so the call is safe. The two ignores silence `call-overload` + `no-any-return` on the one line.

Test plan

  • `uv run ruff format --check .` / `ruff check .` → clean
  • `uv run mypy vgi_rpc/ --any-exprs-report ...` → Success: no issues found in 60 source files (was failing with 2 errors before)
  • Type precision: 97.18% (well above the 95% CI threshold)
  • `uv run pytest --timeout=50` → 3324 passed

🤖 Generated with Claude Code

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

pyarrow's stubs declare nulls() overloads per concrete DataType subtype
but none for the abstract base — and we accept ``DataType`` because
callers pass arbitrary inferred Arrow types. Runtime behaviour is
correct for every concrete subtype; the ignores just silence mypy's
overload-matching + no-any-return on the line.

Unblocks CI Lint (was failing under --any-exprs-report on every PR
since the pyarrow stubs tightened).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@rustyconover rustyconover force-pushed the fix/utils-mypy-pyarrow-nulls branch from 2f0fb3b to 6e7b5bc Compare May 18, 2026 03:42
@rustyconover rustyconover merged commit 53d723e into main May 18, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants