@@ -318,7 +318,18 @@ class DuckDBPyConnection:
318318 def list_type (self , type : sqltypes .DuckDBPyType ) -> sqltypes .DuckDBPyType : ...
319319 def load_extension (self , extension : str ) -> None : ...
320320 def map_type (self , key : sqltypes .DuckDBPyType , value : sqltypes .DuckDBPyType ) -> sqltypes .DuckDBPyType : ...
321- def pl (self , rows_per_batch : pytyping .SupportsInt = 1000000 , * , lazy : bool = False ) -> polars .DataFrame : ...
321+ @pytyping .overload
322+ def pl (
323+ self , rows_per_batch : pytyping .SupportsInt = 1000000 , * , lazy : pytyping .Literal [False ] = ...
324+ ) -> polars .DataFrame : ...
325+ @pytyping .overload
326+ def pl (
327+ self , rows_per_batch : pytyping .SupportsInt = 1000000 , * , lazy : pytyping .Literal [True ]
328+ ) -> polars .LazyFrame : ...
329+ @pytyping .overload
330+ def pl (
331+ self , rows_per_batch : pytyping .SupportsInt = 1000000 , * , lazy : bool = False
332+ ) -> pytyping .Union [polars .DataFrame , polars .LazyFrame ]: ...
322333 def query (self , query : str , * , alias : str = "" , params : object = None ) -> DuckDBPyRelation : ...
323334 def query_progress (self ) -> float : ...
324335 def read_csv (
@@ -596,7 +607,16 @@ class DuckDBPyRelation:
596607 ) -> DuckDBPyRelation : ...
597608 def order (self , order_expr : str ) -> DuckDBPyRelation : ...
598609 def percent_rank (self , window_spec : str , projected_columns : str = "" ) -> DuckDBPyRelation : ...
599- def pl (self , batch_size : pytyping .SupportsInt = 1000000 , * , lazy : bool = False ) -> polars .DataFrame : ...
610+ @pytyping .overload
611+ def pl (
612+ self , batch_size : pytyping .SupportsInt = 1000000 , * , lazy : pytyping .Literal [False ] = ...
613+ ) -> polars .DataFrame : ...
614+ @pytyping .overload
615+ def pl (self , batch_size : pytyping .SupportsInt = 1000000 , * , lazy : pytyping .Literal [True ]) -> polars .LazyFrame : ...
616+ @pytyping .overload
617+ def pl (
618+ self , batch_size : pytyping .SupportsInt = 1000000 , * , lazy : bool = False
619+ ) -> pytyping .Union [polars .DataFrame , polars .LazyFrame ]: ...
600620 def product (
601621 self , column : str , groups : str = "" , window_spec : str = "" , projected_columns : str = ""
602622 ) -> DuckDBPyRelation : ...
@@ -700,6 +720,7 @@ class DuckDBPyRelation:
700720 partition_by : pytyping .List [str ] | None = None ,
701721 write_partition_columns : bool | None = None ,
702722 append : bool | None = None ,
723+ filename_pattern : str | None = None ,
703724 ) -> None : ...
704725 def to_table (self , table_name : str ) -> None : ...
705726 def to_view (self , view_name : str , replace : bool = True ) -> DuckDBPyRelation : ...
@@ -752,6 +773,7 @@ class DuckDBPyRelation:
752773 partition_by : pytyping .List [str ] | None = None ,
753774 write_partition_columns : bool | None = None ,
754775 append : bool | None = None ,
776+ filename_pattern : str | None = None ,
755777 ) -> None : ...
756778 @property
757779 def alias (self ) -> str : ...
@@ -1048,7 +1070,7 @@ def commit(*, connection: DuckDBPyConnection | None = None) -> DuckDBPyConnectio
10481070def connect (
10491071 database : str | pathlib .Path = ":memory:" ,
10501072 read_only : bool = False ,
1051- config : dict [str , str ] | None = None ,
1073+ config : dict [str , str | bool | int | float | list [ str ] ] | None = None ,
10521074) -> DuckDBPyConnection : ...
10531075def create_function (
10541076 name : str ,
@@ -1241,12 +1263,27 @@ def map_type(
12411263def order (
12421264 df : pandas .DataFrame , order_expr : str , * , connection : DuckDBPyConnection | None = None
12431265) -> DuckDBPyRelation : ...
1266+ @pytyping .overload
12441267def pl (
12451268 rows_per_batch : pytyping .SupportsInt = 1000000 ,
12461269 * ,
1247- lazy : bool = False ,
1270+ lazy : pytyping . Literal [ False ] = ... ,
12481271 connection : DuckDBPyConnection | None = None ,
12491272) -> polars .DataFrame : ...
1273+ @pytyping .overload
1274+ def pl (
1275+ rows_per_batch : pytyping .SupportsInt = 1000000 ,
1276+ * ,
1277+ lazy : pytyping .Literal [True ],
1278+ connection : DuckDBPyConnection | None = None ,
1279+ ) -> polars .LazyFrame : ...
1280+ @pytyping .overload
1281+ def pl (
1282+ rows_per_batch : pytyping .SupportsInt = 1000000 ,
1283+ * ,
1284+ lazy : bool = False ,
1285+ connection : DuckDBPyConnection | None = None ,
1286+ ) -> pytyping .Union [polars .DataFrame , polars .LazyFrame ]: ...
12501287def project (
12511288 df : pandas .DataFrame , * args : str | Expression , groups : str = "" , connection : DuckDBPyConnection | None = None
12521289) -> DuckDBPyRelation : ...
0 commit comments