Skip to content

Commit 1195f94

Browse files
fix type hint for sort_by (apache#130)
sort_by takes str or list[tuple(name, order)] as its argument where str is a field name not a sort order
1 parent a0adbc9 commit 1195f94

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyarrow-stubs/__lib_pxi/table.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ class _Tabular(_PandasConvertible[pd.DataFrame], Generic[_ColumnT]):
434434
def schema(self) -> Schema: ...
435435
@property
436436
def nbytes(self) -> int: ...
437-
def sort_by(self, sorting: Order | list[tuple[str, Order]], **kwargs) -> Self: ...
437+
def sort_by(self, sorting: str | list[tuple[str, Order]], **kwargs) -> Self: ...
438438
def take(self, indices: Indices) -> Self: ...
439439
def filter(
440440
self, mask: Mask | Expression, null_selection_behavior: NullSelectionBehavior = "drop"

pyarrow-stubs/_dataset.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class Dataset(lib._Weakrefable):
101101
@property
102102
def schema(self) -> lib.Schema: ...
103103
def filter(self, expression: Expression) -> Self: ...
104-
def sort_by(self, sorting: Order | list[tuple[str, Order]], **kwargs) -> InMemoryDataset: ...
104+
def sort_by(self, sorting: str | list[tuple[str, Order]], **kwargs) -> InMemoryDataset: ...
105105
def join(
106106
self,
107107
right_dataset: Dataset,

0 commit comments

Comments
 (0)