Skip to content
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

fix: update type hints for path_or_paths and source parameters in ParquetDataset and read_table #171

Merged
merged 1 commit into from
Jan 19, 2025
Merged
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
fix: update type hints for path_or_paths and source parameters in Par…
…quetDataset and read_table
  • Loading branch information
zen-xu committed Jan 19, 2025
commit eab30ceef14e411acb09f99ff08c812bb59640e3
8 changes: 5 additions & 3 deletions pyarrow-stubs/parquet/core.pyi
Original file line number Diff line number Diff line change
@@ -13,7 +13,6 @@ if sys.version_info >= (3, 10):
else:
from typing_extensions import TypeAlias

from _typeshed import StrPath
from pyarrow import _parquet
from pyarrow._compute import Expression
from pyarrow._fs import FileSystem, SupportedFileSystem
@@ -180,7 +179,10 @@ class ParquetWriter:
class ParquetDataset:
def __init__(
self,
path_or_paths: SingleOrList[StrPath | NativeFile | IO],
path_or_paths: SingleOrList[str]
| SingleOrList[Path]
| SingleOrList[NativeFile]
| SingleOrList[IO],
filesystem: SupportedFileSystem | None = None,
schema: Schema | None = None,
*,
@@ -218,7 +220,7 @@ class ParquetDataset:
def partitioning(self) -> Partitioning: ...

def read_table(
source: SingleOrList[StrPath | NativeFile | IO],
source: SingleOrList[str] | SingleOrList[Path] | SingleOrList[NativeFile] | SingleOrList[IO],
*,
columns: list | None = None,
use_threads: bool = True,