Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ci/scripts/python_test_type_annotations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ fi
pip install fsspec pandas-stubs scipy-stubs types-cffi types-psutil types-requests types-python-dateutil

# Install type checkers
pip install mypy pyright ty
pip install mypy pyrefly pyright ty

# Run type checkers
cd "${pyarrow_dir}"
mypy
pyright --stats
ty check --verbose --output-format concise
pyrefly check --summarize-errors
11 changes: 11 additions & 0 deletions docs/source/developers/python/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,17 @@ To run ty (note: currently only partially configured):
$ cd arrow/python
$ ty check

**pyrefly**

To run pyrefly:

.. code-block::

$ cd arrow/python
$ pyrefly check

The pyrefly configuration is in the ``[tool.pyrefly]`` section of ``pyproject.toml``.

Maintaining Type Stubs
-----------------------

Expand Down
13 changes: 13 additions & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,19 @@ exclude = [
stubPath = "pyarrow-stubs"
typeCheckingMode = "basic"

# TODO: Enable type checking once stubs are merged
[tool.pyrefly]
project-includes = ["pyarrow-stubs"]
project-excludes = [
"pyarrow",
"benchmarks",
"examples",
"scripts",
"build",
]
search-path = ["pyarrow-stubs"]
python-version = "3.11"

# TODO: Enable type checking once stubs are merged
[tool.ty.environment]
extra-paths = ["pyarrow-stubs"]
Expand Down
Loading