Skip to content

Commit

Permalink
Add missing partitioning typing case (#132)
Browse files Browse the repository at this point in the history
This should now support the examples in the docstring for partitioning.
  • Loading branch information
mariusvniekerk authored Oct 24, 2024
1 parent 717e64b commit 090ea66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pyarrow-stubs/_dataset.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,12 @@ class DirectoryPartitioning(KeyValuePartitioning):
schema: lib.Schema | None = None,
segment_encoding: Literal["uri", "none"] = "uri",
) -> PartitioningFactory: ...
def __init__(
self,
schema: lib.Schema,
dictionaries: dict[str, lib.Array] | None = None,
segment_encoding: Literal["uri", "none"] = "uri",
) -> None: ...

class HivePartitioning(KeyValuePartitioning):
def __init__(
Expand Down
4 changes: 4 additions & 0 deletions pyarrow-stubs/dataset.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ __all__ = [

_DatasetFormat: TypeAlias = Literal["parquet", "ipc", "arrow", "feather", "csv"]

@overload
def partitioning(
schema: Schema,
) -> Partitioning: ...
@overload
def partitioning(
schema: Schema,
Expand Down

0 comments on commit 090ea66

Please sign in to comment.