@@ -18,7 +18,6 @@ use pyrefly_python::dunder;
1818use pyrefly_python:: module_name:: ModuleName ;
1919use pyrefly_python:: nesting_context:: NestingContext ;
2020use pyrefly_python:: short_identifier:: ShortIdentifier ;
21- use pyrefly_types:: data_frame:: DataFrameKind ;
2221use pyrefly_types:: dimension:: Int ;
2322use pyrefly_types:: dimension:: canonicalize;
2423use pyrefly_types:: dimension:: gradual_size;
@@ -88,7 +87,7 @@ use crate::alt::answers_solver::TypeCheckOptions;
8887use crate :: alt:: callable:: CallArg ;
8988use crate :: alt:: class:: typed_dict:: TypedDictErrorKind ;
9089use crate :: alt:: nn_module_specials:: is_nn_module_dict;
91- use crate :: alt:: polars_specials:: is_polars_series ;
90+ use crate :: alt:: polars_specials:: is_polars_api_series ;
9291use crate :: alt:: regex:: RegexValidationError ;
9392use crate :: alt:: regex:: validate_pattern;
9493use crate :: alt:: shape_extension:: is_int_tuple_bound;
@@ -3833,7 +3832,7 @@ impl<'ctx, 'answer, Ans: LookupAnswer> AnswersSolver<'ctx, 'answer, Ans> {
38333832 ) ,
38343833 Type :: DataFrame ( schema) => {
38353834 if let Expr :: List ( ExprList { elts, .. } ) = slice
3836- && schema. kind == DataFrameKind :: Polars
3835+ && schema. kind . is_polars_api ( )
38373836 {
38383837 if elts. is_empty ( ) {
38393838 return Type :: DataFrame ( schema) ;
@@ -3849,7 +3848,7 @@ impl<'ctx, 'answer, Ans: LookupAnswer> AnswersSolver<'ctx, 'answer, Ans> {
38493848 && let Some ( name) = self . polars_column_name ( slice)
38503849 {
38513850 match schema. columns . iter ( ) . find ( |( c, _) | * * c == name) {
3852- Some ( ( _, dtype) ) if schema. kind == DataFrameKind :: Polars => {
3851+ Some ( ( _, dtype) ) if schema. kind . is_polars_api ( ) => {
38533852 column_dtype = Some ( dtype. clone ( ) ) ;
38543853 }
38553854 Some ( _) => { }
@@ -3876,7 +3875,7 @@ impl<'ctx, 'answer, Ans: LookupAnswer> AnswersSolver<'ctx, 'answer, Ans> {
38763875 // Preserve the stub's Series class when attaching an element dtype.
38773876 match ( column_dtype, result) {
38783877 ( Some ( dtype) , Type :: ClassType ( cls) )
3879- if is_polars_series ( cls. class_object ( ) ) =>
3878+ if is_polars_api_series ( cls. class_object ( ) ) =>
38803879 {
38813880 SeriesSchema {
38823881 underlying : cls,
0 commit comments