@@ -9,8 +9,6 @@ if pytyping.TYPE_CHECKING:
99 import polars
1010 import pandas
1111 import pyarrow .lib
12- import torch as pytorch
13- import tensorflow
1412 from collections .abc import Callable , Sequence , Mapping
1513 from duckdb import sqltypes , func
1614
@@ -247,7 +245,7 @@ class DuckDBPyConnection:
247245 def from_arrow (self , arrow_object : object ) -> DuckDBPyRelation : ...
248246 def from_csv_auto (
249247 self ,
250- path_or_buffer : str | bytes | os .PathLike [str ] | os .PathLike [bytes ],
248+ path_or_buffer : str | bytes | os .PathLike [str ] | os .PathLike [bytes ] | pytyping . IO [ bytes ] ,
251249 header : bool | int | None = None ,
252250 compression : str | None = None ,
253251 sep : str | None = None ,
@@ -350,7 +348,7 @@ class DuckDBPyConnection:
350348 def query_progress (self ) -> float : ...
351349 def read_csv (
352350 self ,
353- path_or_buffer : str | bytes | os .PathLike [str ],
351+ path_or_buffer : str | bytes | os .PathLike [str ] | os . PathLike [ bytes ] | pytyping . IO [ bytes ] ,
354352 header : bool | int | None = None ,
355353 compression : str | None = None ,
356354 sep : str | None = None ,
@@ -456,8 +454,8 @@ class DuckDBPyConnection:
456454 ) -> sqltypes .DuckDBPyType : ...
457455 def table (self , table_name : str ) -> DuckDBPyRelation : ...
458456 def table_function (self , name : str , parameters : object = None ) -> DuckDBPyRelation : ...
459- def tf (self ) -> dict [str , tensorflow . Tensor ]: ...
460- def torch (self ) -> dict [str , pytorch . Tensor ]: ...
457+ def tf (self ) -> dict [str , pytyping . Any ]: ...
458+ def torch (self ) -> dict [str , pytyping . Any ]: ...
461459 def type (self , type_str : str ) -> sqltypes .DuckDBPyType : ...
462460 def union_type (
463461 self , members : list [sqltypes .DuckDBPyType ] | dict [str , sqltypes .DuckDBPyType ]
@@ -478,7 +476,7 @@ class DuckDBPyRelation:
478476 def __getitem__ (self , name : str ) -> DuckDBPyRelation : ...
479477 def __len__ (self ) -> int : ...
480478 def aggregate (
481- self , aggr_expr : Expression | str | list [Expression ], group_expr : Expression | str = ""
479+ self , aggr_expr : str | Expression | list [Expression | str ], group_expr : Expression | str = ""
482480 ) -> DuckDBPyRelation : ...
483481 def any_value (
484482 self , expression : str , groups : str = "" , window_spec : str = "" , projected_columns : str = ""
@@ -710,7 +708,7 @@ class DuckDBPyRelation:
710708 def sum (
711709 self , expression : str , groups : str = "" , window_spec : str = "" , projected_columns : str = ""
712710 ) -> DuckDBPyRelation : ...
713- def tf (self ) -> dict [str , tensorflow . Tensor ]: ...
711+ def tf (self ) -> dict [str , pytyping . Any ]: ...
714712 def to_csv (
715713 self ,
716714 file_name : str ,
@@ -751,7 +749,7 @@ class DuckDBPyRelation:
751749 ) -> None : ...
752750 def to_table (self , table_name : str ) -> None : ...
753751 def to_view (self , view_name : str , replace : bool = True ) -> DuckDBPyRelation : ...
754- def torch (self ) -> dict [str , pytorch . Tensor ]: ...
752+ def torch (self ) -> dict [str , pytyping . Any ]: ...
755753 def union (self , union_rel : DuckDBPyRelation ) -> DuckDBPyRelation : ...
756754 def unique (self , unique_aggr : str ) -> DuckDBPyRelation : ...
757755 def update (self , set : Expression | str , * , condition : Expression | str | None = None ) -> None : ...
@@ -771,6 +769,7 @@ class DuckDBPyRelation:
771769 def write_csv (
772770 self ,
773771 file_name : str ,
772+ * ,
774773 sep : str | None = None ,
775774 na_rep : str | None = None ,
776775 header : bool | None = None ,
@@ -790,6 +789,7 @@ class DuckDBPyRelation:
790789 def write_parquet (
791790 self ,
792791 file_name : str ,
792+ * ,
793793 compression : str | None = None ,
794794 field_ids : ParquetFieldIdsType | pytyping .Literal ["auto" ] | None = None ,
795795 row_group_size_bytes : str | int | None = None ,
@@ -810,7 +810,7 @@ class DuckDBPyRelation:
810810 @property
811811 def description (self ) -> pytyping .List [tuple [str , sqltypes .DuckDBPyType , None , None , None , None , None ]]: ...
812812 @property
813- def dtypes (self ) -> pytyping .List [str ]: ...
813+ def dtypes (self ) -> pytyping .List [sqltypes . DuckDBPyType ]: ...
814814 @property
815815 def shape (self ) -> tuple [int , int ]: ...
816816 @property
@@ -1067,7 +1067,7 @@ def DefaultExpression() -> Expression: ...
10671067def FunctionExpression (function_name : str , * args : Expression ) -> Expression : ...
10681068def LambdaExpression (lhs : pytyping .Any , rhs : Expression ) -> Expression : ...
10691069def SQLExpression (expression : str ) -> Expression : ...
1070- def StarExpression (* , exclude : pytyping . Any = None ) -> Expression : ...
1070+ def StarExpression (* , exclude : list [ str | Expression ] | None = None ) -> Expression : ...
10711071def aggregate (
10721072 df : pandas .DataFrame ,
10731073 aggr_expr : Expression | list [Expression ] | str | list [str ],
@@ -1194,7 +1194,7 @@ def from_arrow(
11941194 connection : DuckDBPyConnection | None = None ,
11951195) -> DuckDBPyRelation : ...
11961196def from_csv_auto (
1197- path_or_buffer : str | bytes | os .PathLike [str ],
1197+ path_or_buffer : str | bytes | os .PathLike [str ] | os . PathLike [ bytes ] | pytyping . IO [ bytes ] ,
11981198 header : bool | int | None = None ,
11991199 compression : str | None = None ,
12001200 sep : str | None = None ,
@@ -1346,7 +1346,7 @@ def query_df(
13461346) -> DuckDBPyRelation : ...
13471347def query_progress (* , connection : DuckDBPyConnection | None = None ) -> float : ...
13481348def read_csv (
1349- path_or_buffer : str | bytes | os .PathLike [str ],
1349+ path_or_buffer : str | bytes | os .PathLike [str ] | os . PathLike [ bytes ] | pytyping . IO [ bytes ] ,
13501350 header : bool | int | None = None ,
13511351 compression : str | None = None ,
13521352 sep : str | None = None ,
@@ -1475,9 +1475,9 @@ def table_function(
14751475 * ,
14761476 connection : DuckDBPyConnection | None = None ,
14771477) -> DuckDBPyRelation : ...
1478- def tf (* , connection : DuckDBPyConnection | None = None ) -> dict [str , tensorflow . Tensor ]: ...
1478+ def tf (* , connection : DuckDBPyConnection | None = None ) -> dict [str , pytyping . Any ]: ...
14791479def tokenize (query : str ) -> list [tuple [int , token_type ]]: ...
1480- def torch (* , connection : DuckDBPyConnection | None = None ) -> dict [str , pytorch . Tensor ]: ...
1480+ def torch (* , connection : DuckDBPyConnection | None = None ) -> dict [str , pytyping . Any ]: ...
14811481def type (type_str : str , * , connection : DuckDBPyConnection | None = None ) -> sqltypes .DuckDBPyType : ...
14821482def union_type (
14831483 members : dict [str , sqltypes .DuckDBPyType ] | list [sqltypes .DuckDBPyType ],
0 commit comments