Commit 45fb522
authored
Fix : aggregate method typing to accept list of expressions (#246)
Fixes #209
The type stub for `DuckDBPyRelation.aggregate` incorrectly restricts the
`aggr_expr` parameter to `Expression | str`. However, the DuckDB Python
API
and runtime behavior also support passing a list of `Expression` objects
for
multiple aggregations.
The fix extends the type annotation to include `list[Expression]`,
aligning
the stub definition with the actual supported API behavior.
```
def aggregate(
self, aggr_expr: Expression | str | list[Expression], group_expr: Expression | str = ""
) -> DuckDBPyRelation: ...
```1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
461 | 461 | | |
462 | 462 | | |
463 | 463 | | |
464 | | - | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
465 | 467 | | |
466 | 468 | | |
467 | 469 | | |
| |||
0 commit comments