Skip to content

Commit

Permalink
fix: update type hints for path_or_paths and source parameters in Par…
Browse files Browse the repository at this point in the history
…quetDataset and read_table (#171)
  • Loading branch information
zen-xu authored Jan 19, 2025
1 parent 08a68ca commit 2015653
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions pyarrow-stubs/parquet/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
*,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2015653

Please sign in to comment.