You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Another issue for type check.
According to the documentation, StarExpression accepts a list (not clearly stated though) as its parameter. However, the stub has the signature (line 1021 in _duckdb-stubs/__init__.pyi, the main branch)
now the type hint is Any. Type checkers won't complain but it's now useful for type safety, and anyway the documentation is incorrect in the sense that it should say an Iterable rather than a list.
Any non-Iterable argument will indeed be rejected.
From my understanding, the correct type should then be Iterable[str | Expression]
Activity
OutSquareCapital commentedon Feb 12, 2026
now the type hint is
Any. Type checkers won't complain but it's now useful for type safety, and anyway the documentation is incorrect in the sense that it should say an Iterable rather than a list.Any non-Iterable argument will indeed be rejected.
From my understanding, the correct type should then be
Iterable[str | Expression]See below:
Code
ouput
* EXCLUDE (foo, bar, baz)* EXCLUDE (foo, bar, baz)* EXCLUDE (foo, bar, baz)'int' object is not iterableOnly ColumnExpressions are accepted Expression types here* EXCLUDE (x)* EXCLUDE (foo)'_duckdb.Expression' object is not iterableevertlammerts commentedon Feb 17, 2026
Fixed in #323.
OutSquareCapital commentedon Feb 17, 2026
Same observation as I made in #209, list is too narrow.
Fix multiple stub issues (#323)