done
This commit is contained in:
25
lib/python3.11/site-packages/narwhals/_polars/typing.py
Normal file
25
lib/python3.11/site-packages/narwhals/_polars/typing.py
Normal file
@ -0,0 +1,25 @@
|
||||
from __future__ import annotations # pragma: no cover
|
||||
|
||||
from typing import (
|
||||
TYPE_CHECKING, # pragma: no cover
|
||||
Union, # pragma: no cover
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
import sys
|
||||
from typing import Literal, TypeVar
|
||||
|
||||
if sys.version_info >= (3, 10):
|
||||
from typing import TypeAlias
|
||||
else:
|
||||
from typing_extensions import TypeAlias
|
||||
|
||||
from narwhals._polars.dataframe import PolarsDataFrame, PolarsLazyFrame
|
||||
from narwhals._polars.expr import PolarsExpr
|
||||
from narwhals._polars.series import PolarsSeries
|
||||
|
||||
IntoPolarsExpr: TypeAlias = Union[PolarsExpr, PolarsSeries]
|
||||
FrameT = TypeVar("FrameT", PolarsDataFrame, PolarsLazyFrame)
|
||||
NativeAccessor: TypeAlias = Literal[
|
||||
"arr", "cat", "dt", "list", "meta", "name", "str", "bin", "struct"
|
||||
]
|
Reference in New Issue
Block a user