diff --git a/python/stubs/__lib_pxi/types.pyi b/python/stubs/__lib_pxi/types.pyi index 7fe6c36e332..a7b6062b275 100644 --- a/python/stubs/__lib_pxi/types.pyi +++ b/python/stubs/__lib_pxi/types.pyi @@ -29,7 +29,6 @@ from .io import Buffer from .scalar import ExtensionScalar _AsPyType = TypeVar("_AsPyType") -_DataTypeT = TypeVar("_DataTypeT", bound=DataType) class _Weakrefable: ... class _Metadata(_Weakrefable): ... @@ -186,6 +185,8 @@ class DataType(_Weakrefable): ArrowSchema pointer. """ +_DataTypeT = TypeVar("_DataTypeT", bound=DataType) + class _BasicDataType(DataType, Generic[_AsPyType]): ... class NullType(_BasicDataType[None]): ... class BoolType(_BasicDataType[bool]): ... diff --git a/python/stubs/_fs.pyi b/python/stubs/_fs.pyi index 7670ef5230d..edce54110f7 100644 --- a/python/stubs/_fs.pyi +++ b/python/stubs/_fs.pyi @@ -19,8 +19,6 @@ from fsspec import AbstractFileSystem # type: ignore[import-untyped] from .lib import NativeFile, _Weakrefable -SupportedFileSystem: TypeAlias = Union[AbstractFileSystem, FileSystem] - class FileType(enum.IntFlag): NotFound = enum.auto() Unknown = enum.auto() @@ -618,6 +616,9 @@ class FileSystem(_Weakrefable): The normalized path """ + +SupportedFileSystem: TypeAlias = Union[AbstractFileSystem, FileSystem] + class LocalFileSystem(FileSystem): """ A FileSystem implementation accessing files on the local machine. diff --git a/python/stubs/compute.pyi b/python/stubs/compute.pyi index f9039731ee6..1cf52ff07ca 100644 --- a/python/stubs/compute.pyi +++ b/python/stubs/compute.pyi @@ -217,9 +217,9 @@ NumericOrDurationScalar: TypeAlias = NumericScalar | lib.DurationScalar NumericOrTemporalScalar: TypeAlias = NumericScalar | TemporalScalar _NumericOrTemporalScalarT = TypeVar("_NumericOrTemporalScalarT", bound=NumericOrTemporalScalar) +_NumericScalarT = TypeVar("_NumericScalarT", bound=NumericScalar) NumericArray: TypeAlias = ArrayOrChunkedArray[_NumericScalarT] _NumericArrayT = TypeVar("_NumericArrayT", bound=NumericArray) -_NumericScalarT = TypeVar("_NumericScalarT", bound=NumericScalar) _NumericOrDurationT = TypeVar("_NumericOrDurationT", bound=NumericOrDurationScalar) NumericOrDurationArray: TypeAlias = ArrayOrChunkedArray[NumericOrDurationScalar] _NumericOrDurationArrayT = TypeVar("_NumericOrDurationArrayT", bound=NumericOrDurationArray)