From 2fc90a2e4a446eb187a36b380c25b227028863e2 Mon Sep 17 00:00:00 2001 From: Zhengbo Wang Date: Sun, 25 Aug 2024 10:14:38 +0800 Subject: [PATCH] patch: Fix incosistent between tying and comments in 'from_native' when 'strict=True' --- narwhals/stable/v1.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/narwhals/stable/v1.py b/narwhals/stable/v1.py index 9c7c2d155..b2de85b61 100644 --- a/narwhals/stable/v1.py +++ b/narwhals/stable/v1.py @@ -600,7 +600,7 @@ def from_native( eager_only: None = ..., eager_or_interchange_only: Literal[True], series_only: None = ..., - allow_series: None = ..., + allow_series: Literal[True] = ..., ) -> DataFrame[IntoDataFrameT]: """ from_native(df, strict=True, eager_or_interchange_only=True, allow_series=True) @@ -616,7 +616,7 @@ def from_native( eager_only: Literal[True], eager_or_interchange_only: None = ..., series_only: None = ..., - allow_series: None = ..., + allow_series: Literal[True] = ..., ) -> DataFrame[IntoDataFrameT]: """ from_native(df, strict=True, eager_only=True, allow_series=True) @@ -629,10 +629,10 @@ def from_native( native_dataframe: Any, *, strict: Literal[True] = ..., - eager_only: None = ..., + eager_only: Literal[True] = ..., eager_or_interchange_only: None = ..., series_only: None = ..., - allow_series: Literal[True], + allow_series: None = ..., ) -> DataFrame[Any] | LazyFrame[Any] | Series: """ from_native(df, strict=True, eager_only=True)