-
Notifications
You must be signed in to change notification settings - Fork 0
GH-32609: [Python] Incorporate zen-xu/pyarrow-stubs for typing
#1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The main problem was that these were annotated as instance methods rather than static/class methods, but I've added some detail, too.
Fix stubs for Table factory methods
chore: update pre-commit
fix: make fs.FileSystem.from_uri and hdfs.HadoopFileSystem.from_uri as classmethod
updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.9 → v0.11.13](astral-sh/ruff-pre-commit@v0.11.9...v0.11.13) - [github.com/RobertCraigie/pyright-python: v1.1.400 → v1.1.401](RobertCraigie/pyright-python@v1.1.400...v1.1.401) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/RobertCraigie/pyright-python: v1.1.401 → v1.1.402](RobertCraigie/pyright-python@v1.1.401...v1.1.402) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* doc: complete tensor doc * doc: complete table doc * doc: complete scalar doc * doc: complete orc doc * doc: complete memory doc * doc: complete lib doc * doc: complete json doc * doc: complete hdfs doc * doc: complete gcsfs doc * doc: complete fs doc * doc: complete flight doc * doc: complete dataset doc * doc: complete dataset parquet doc * doc: complete dataset parquet encryption doc * doc: complete cuda doc * doc: complete csv doc * doc: complete azurefs doc * doc: complete core doc * doc: complete interchange doc * doc: complete array doc * doc: complete builder doc * doc: complete device doc * doc: complete io doc * doc: complete ipc doc * doc: complete types doc * mark deprecated apis * doc: complete _compute doc * doc: complete compute doc * doc: update compute doc * lint code
updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.13 → v0.12.0](astral-sh/ruff-pre-commit@v0.11.13...v0.12.0) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.0 → v0.12.3](astral-sh/ruff-pre-commit@v0.12.0...v0.12.3) - [github.com/RobertCraigie/pyright-python: v1.1.402 → v1.1.403](RobertCraigie/pyright-python@v1.1.402...v1.1.403) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
|
Thanks for opening a pull request! If this is not a minor PR. Could you open an issue for this pull request on GitHub? https://github.com/apache/arrow/issues/new/choose Opening GitHub issues ahead of time contributes to the Openness of the Apache Arrow project. Then could you also rename the pull request title in the following format? or See also: |
zen-xu/pyarrow-stubs as a first effort in typingzen-xu/pyarrow-stubs for typing
|
❌ GitHub issue apache#32609 could not be retrieved. |
|
Closing in favour of #3 as history is polluted |
Rationale for this change
Currently, PyArrow is not typed and users have to use the stubs provided by https://github.com/zen-xu/pyarrow-stubs. This is not ideal and requires extra effort by
zen-xuwho has already expressed desire in donating his library (see zen-xu/pyarrow-stubs#186). Will fix apache#32609.What changes are included in this PR?
This PR includes:
py.typedfile to signify that the library is typed (fixes [Python] pyarrow missing py.typed marker file apache/arrow#33113)Are these changes tested?
They will be in a similar mechanism to the workflows NumPy has (
.github/workflows/mypy.yml,.github/workflows/mypy_primer.yml,.github/workflows/mypy_primer_comment.yml).Are there any user-facing changes?
The users will now have types!