Skip to content

[type nitpick] duckdb.connect config is Dict[str, str] #112

Closed

Description

@pudo

What happens?

In duckdb 1.4.1, the type definition of the config dict passed into .connect is Dict[str, str]. However, even the most simple example in the documentation contains an int: https://duckdb.org/docs/stable/clients/python/overview.html#configuration

What's the best practice here now: should str() it all? Is the correct representation for booleans False or false?

To Reproduce

send https://duckdb.org/docs/stable/clients/python/overview.html#configuration through mypy.

OS:

OSX

DuckDB Package Version:

1.4.1

Python Version:

3.12

Full Name:

Friedrich Lindenberg

Affiliation:

OpenSanctions

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

I have not tested with any build

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

Not applicable - the reproduction does not require a data set

Did you include all code required to reproduce the issue?

  • Yes, I have

Did you include all relevant configuration to reproduce the issue?

  • Yes, I have

Activity

  1. evertlammerts commented on Oct 9, 2025

    @evertlammerts
    Member

    Thanks for reporting, I'll update the type hint. In the meantime just use whatever types you were using (i.e. not just strings) and annotate with a # type: ignore.

  2. pudo commented on Oct 9, 2025

    @pudo
    Author

    Thank you, this is much appreciated!

  3. added a commit that references this issue on Oct 31, 2025
    66abe60
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions