Skip to content

Conversation

@rok
Copy link
Owner

@rok rok commented Sep 5, 2025

This proposes adding type annotation to pyarrow by adopting pyarrow-stubs into pyarrow. To do so we copy a subset of pyarrow-subs's stubfiles into pyarrow tree. We then add annotation checks for some stubsfiles and some test files and make sure checks pass. Annotation checks should be expanded until all (or most) project files are covered in future work.

PR introduces:

  1. adds pyarrow-stubs into arrow/python/pyarrow/
  2. fixes pyarrow-stubs to pass mypy and pyright check
  3. adds mypy and pyright check to CI (crudely)
  4. adds a tool (update_stub_docstrings.py) to keep annotation docstrings in sync with source docstrings
  5. adds docstring sync check to CI (crudely)

@rok rok force-pushed the gradual-stubs-2 branch 2 times, most recently from 468a7f1 to 351cb28 Compare September 20, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants