samwgoldman opened a new pull request, #51475: URL: https://github.com/apache/arrow/pull/51475
### Rationale for this change pyarrow's stubs are checked with mypy, pyright, and ty (#48618). This adds pyrefly, as discussed in https://github.com/apache/arrow/pull/48622#discussion_r4085682030. ### What changes are included in this PR? - `ci/scripts/python_test_type_annotations.sh` installs pyrefly and runs `pyrefly check --summarize-errors` after the other checkers. - `python/pyproject.toml` gets a `[tool.pyrefly]` section that mirrors the existing configs: it checks only `pyarrow-stubs`, targets Python 3.11, and puts `pyarrow-stubs` on the search path so `import pyarrow` resolves to the stubs rather than the source package. - The Python development guide documents running pyrefly. ### Are these changes tested? Locally, `ci/scripts/python_test_type_annotations.sh` passes with all four checkers on `main`. I also checked the stubs from #48622 (7 stub files, about 1,070 lines): all four checkers report 0 errors, and pyrefly takes about 0.2s. Pyrefly also reports an error planted in a stub, so it's checking the stubs rather than skipping them. ### Are there any user-facing changes? No. ### Was AI used for this PR? In accordance to the [AI generation guidelines](https://arrow.apache.org/docs/dev/developers/overview.html#ai-generated-code), please disclose below whether and how AI was used in this PR. **PR code and description written by:** - [ ] Human - [x] AI **Reviewed before submission by:** - [x] Human - [ ] AI - [ ] Not reviewed * GitHub Issue: #51474 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
