Skip to content

Wrong LambdaExpression typing in Python package #16490

@tanguyMichardiere

Description

@tanguyMichardiere

What happens?

In the Python stubs, LambdaExpression takes a single lhs argument.

At runtime it works as intended, like in the tests added by the PR, the only problem is Mypy reports an error.

To Reproduce

from duckdb import ColumnExpression, LambdaExpression

LambdaExpression('x', ColumnExpression('x') + 3)
mypy reproduction.py
reproduction.py:3: error: Too many arguments for "LambdaExpression"  [call-arg]
                LambdaExpression('x', ColumnExpression('x') + 3)
                ^

OS:

macOS Sequoia 15.3.1

DuckDB Version:

1.2.0

DuckDB Client:

Python

Hardware:

No response

Full Name:

Tanguy Michardière

Affiliation:

Xpdeep

What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have tested with a stable release

Did you include all relevant data sets for reproducing the issue?

Yes

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration (e.g., CPU architecture, Python version, Linux distribution) to reproduce the issue?

  • Yes, I have

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR submittedA pull request was submitted to fix the issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions