Skip to content

Commit 65416d6

Browse files
committed
Fix invalid-type-form errors
1 parent 3563575 commit 65416d6

File tree

5 files changed

+8
-5
lines changed

5 files changed

+8
-5
lines changed

python/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ rules.invalid-argument-type = "ignore"
106106
rules.invalid-assignment = "ignore"
107107
rules.invalid-context-manager = "ignore"
108108
rules.invalid-return-type = "ignore"
109-
rules.invalid-type-form = "ignore"
110109
rules.no-matching-overload = "ignore"
111110
rules.non-subscriptable = "ignore"
112111
rules.not-iterable = "ignore"

python/stubs/__lib_pxi/array.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import builtins
12
import datetime as dt
23
import sys
34

@@ -1990,7 +1991,7 @@ class Array(_PandasConvertible[pd.Series], Generic[_Scalar_co]):
19901991
@overload
19911992
def __getitem__(self, key: int) -> _Scalar_co: ...
19921993
@overload
1993-
def __getitem__(self, key: slice) -> Self: ...
1994+
def __getitem__(self, key: builtins.slice) -> Self: ...
19941995
def __getitem__(self, key):
19951996
"""
19961997
Slice or return value at given index

python/stubs/__lib_pxi/io.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import builtins
12
import sys
23

34
from collections.abc import Callable
@@ -578,7 +579,7 @@ class Buffer(_Weakrefable):
578579
@property
579580
def parent(self) -> Buffer | None: ...
580581
@overload
581-
def __getitem__(self, key: slice) -> Self: ...
582+
def __getitem__(self, key: builtins.slice) -> Self: ...
582583
@overload
583584
def __getitem__(self, key: int) -> int: ...
584585
def slice(self, offset: int = 0, length: int | None = None) -> Self:

python/stubs/__lib_pxi/table.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import builtins
12
import datetime as dt
23
import sys
34

@@ -294,7 +295,7 @@ class ChunkedArray(_PandasConvertible[pd.Series], Generic[_Scalar_co]):
294295
"""
295296
def __sizeof__(self) -> int: ...
296297
@overload
297-
def __getitem__(self, key: slice) -> Self: ...
298+
def __getitem__(self, key: builtins.slice) -> Self: ...
298299
@overload
299300
def __getitem__(self, key: int) -> _Scalar_co: ...
300301
def __getitem__(self, key):

python/stubs/compute.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ from . import lib
9393

9494
_P = ParamSpec("_P")
9595
_R = TypeVar("_R")
96+
_CallableType = Callable[_P, _R]
9697

9798
def field(*name_or_index: str | tuple[str, ...] | int) -> Expression:
9899
"""Reference a column of the dataset.
@@ -156,7 +157,7 @@ def scalar(value: bool | float | str) -> Expression:
156157
An Expression representing the scalar value
157158
"""
158159

159-
def _clone_signature(f: Callable[_P, _R]) -> Callable[_P, _R]: ...
160+
def _clone_signature(f: _CallableType) -> _CallableType: ...
160161

161162
# ============= compute functions =============
162163
_DataTypeT = TypeVar("_DataTypeT", bound=lib.DataType)

0 commit comments

Comments
 (0)