GH-32609: [Python] Incorporate zen-xu/pyarrow-stubs for typing#1
Closed
paddyroddy wants to merge 222 commits intomainfrom
Closed
GH-32609: [Python] Incorporate zen-xu/pyarrow-stubs for typing#1paddyroddy wants to merge 222 commits intomainfrom
zen-xu/pyarrow-stubs for typing#1paddyroddy wants to merge 222 commits intomainfrom
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. |
Author
|
Closing in favour of #3 as history is polluted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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!