Skip to content

Commit 4ebc3ba

Browse files
using PythonLiteral types in place of typing.Any for Connexion.create_function and Relation.map
1 parent 7b0cb42 commit 4ebc3ba

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

_duckdb-stubs/__init__.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class DuckDBPyConnection:
214214
def create_function(
215215
self,
216216
name: str,
217-
function: Callable[..., typing.Any],
217+
function: Callable[..., PythonLiteral],
218218
parameters: lst[IntoDType] | None = None,
219219
return_type: IntoDType | None = None,
220220
*,
@@ -602,7 +602,7 @@ class DuckDBPyRelation:
602602
self, expression: str, groups: str = "", window_spec: str = "", projected_columns: str = ""
603603
) -> DuckDBPyRelation: ...
604604
def map(
605-
self, map_function: Callable[..., typing.Any], *, schema: dict[str, sqltypes.DuckDBPyType] | None = None
605+
self, map_function: Callable[..., PythonLiteral], *, schema: dict[str, sqltypes.DuckDBPyType] | None = None
606606
) -> DuckDBPyRelation: ...
607607
def max(
608608
self, expression: str, groups: str = "", window_spec: str = "", projected_columns: str = ""
@@ -1057,7 +1057,7 @@ def connect(
10571057
) -> DuckDBPyConnection: ...
10581058
def create_function(
10591059
name: str,
1060-
function: Callable[..., typing.Any],
1060+
function: Callable[..., PythonLiteral],
10611061
parameters: lst[IntoDType] | None = None,
10621062
return_type: IntoDType | None = None,
10631063
*,

0 commit comments

Comments
 (0)