Skip to content

Commit e0bce84

Browse files
committed
Updated the _function and _decorator helpers in ScalarUDF.udf to use concrete Callable[..., Any] and pa.DataType | pa.Field annotations, removing the lingering references to the deleted _R type variable.
1 parent 2325993 commit e0bce84

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

python/datafusion/user_defined.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ def double_udf(x):
261261
"""
262262

263263
def _function(
264-
func: Callable[..., _R],
264+
func: Callable[..., Any],
265265
input_types: list[pa.DataType],
266-
return_type: _R,
266+
return_type: pa.DataType | pa.Field,
267267
volatility: Volatility | str,
268268
name: Optional[str] = None,
269269
) -> ScalarUDF:
@@ -285,7 +285,7 @@ def _function(
285285

286286
def _decorator(
287287
input_types: list[pa.DataType],
288-
return_type: _R,
288+
return_type: pa.DataType | pa.Field,
289289
volatility: Volatility | str,
290290
name: Optional[str] = None,
291291
) -> Callable:

0 commit comments

Comments
 (0)