Skip to content

Commit

Permalink
fix: pa.dictionary and pa.schema annotation (#59)
Browse files Browse the repository at this point in the history
* fix pa.dictionary annotation

* fix: schema annotation
  • Loading branch information
zen-xu authored Aug 30, 2024
1 parent 5e17936 commit e301fde
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pyarrow-stubs/__lib_pxi/types.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,11 @@ def map_(key_type: _K, item_type: _IndexT) -> MapType[_K, _IndexT, Literal[False
def map_(
key_type: _K, item_type: _IndexT, key_sorted: _Ordered
) -> MapType[_K, _IndexT, _Ordered]: ...
@overload
def dictionary(
index_type: _IndexT, value_type: _ValueT
) -> DictionaryType[_IndexT, _ValueT, Literal[False]]: ...
@overload
def dictionary(
index_type: _IndexT, value_type: _ValueT, ordered: _Ordered
) -> DictionaryType[_IndexT, _ValueT, _Ordered]: ...
Expand Down Expand Up @@ -570,7 +575,7 @@ def ensure_type(ty: Literal["duration[ns]"]) -> DurationType[Literal["ns"]]: ...
@overload
def ensure_type(ty: Literal["month_day_nano_interval"]) -> MonthDayNanoIntervalType: ...
def schema(
fields: Iterable[Field | tuple[str, Field]] | Mapping[str, Field],
fields: Iterable[Field] | Iterable[tuple[str, DataType]] | Mapping[str, DataType],
metadata: dict[bytes, bytes] | None = None,
) -> Schema: ...
def from_numpy_dtype(dtype: np.dtype) -> DataType: ...
Expand Down

0 comments on commit e301fde

Please sign in to comment.