Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(typing): Use correct TypeVar/Union pairs in from_native #1935

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions narwhals/translate.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
from narwhals.dataframe import LazyFrame
from narwhals.series import Series
from narwhals.typing import IntoDataFrameT
from narwhals.typing import IntoFrame
from narwhals.typing import IntoFrameT
from narwhals.typing import IntoSeries
from narwhals.typing import IntoSeriesT
Expand Down Expand Up @@ -129,7 +130,7 @@ def to_native(

@overload
def from_native(
native_object: IntoDataFrameT | IntoSeriesT,
native_object: IntoDataFrameT | IntoSeries,
*,
pass_through: Literal[True],
eager_only: Literal[False] = ...,
Expand Down Expand Up @@ -239,7 +240,7 @@ def from_native(

@overload
def from_native(
native_object: IntoFrameT | IntoSeriesT,
native_object: IntoFrame | IntoSeries,
*,
pass_through: Literal[False] = ...,
eager_only: Literal[False] = ...,
Expand Down Expand Up @@ -283,7 +284,7 @@ def from_native(


def from_native(
native_object: IntoFrameT | IntoSeries | T,
native_object: IntoFrameT | IntoSeriesT | IntoFrame | IntoSeries | T,
*,
strict: bool | None = None,
pass_through: bool | None = None,
Expand Down
Loading