From eab30ceef14e411acb09f99ff08c812bb59640e3 Mon Sep 17 00:00:00 2001 From: "ZhengYu, Xu" Date: Sun, 19 Jan 2025 15:20:01 +0800 Subject: [PATCH] fix: update type hints for path_or_paths and source parameters in ParquetDataset and read_table --- pyarrow-stubs/parquet/core.pyi | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pyarrow-stubs/parquet/core.pyi b/pyarrow-stubs/parquet/core.pyi index ac1d6db..d3ac8f9 100644 --- a/pyarrow-stubs/parquet/core.pyi +++ b/pyarrow-stubs/parquet/core.pyi @@ -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,