What happens?
Type checkers (pyright, ty etc) report the return of DuckDBPyRelation.dtypes property as List[str] but runtime type is List[DuckDBPyType]
To Reproduce
import typing as t
import duckdb
import pandas as pd
rel = duckdb.from_df(pd.DataFrame({"name": ["Alice", "Bob"]}))
col_dtypes = rel.dtypes
t.reveal_type(col_dtypes) # pyright reports type as List[str]
print(type(col_dtypes[0])) # output in shell is <class '_duckdb._sqltypes.DuckDBPyType'>
OS:
x86_64 GNU/Linux
DuckDB Package Version:
1.4.3
Python Version:
3.11.9
Full Name:
Ashwin A Nayar
Affiliation:
Corridor Platforms
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?
Not applicable - the reproduction does not require a data set
Did you include all code required to reproduce the issue?
Did you include all relevant configuration to reproduce the issue?
What happens?
Type checkers (pyright, ty etc) report the return of
DuckDBPyRelation.dtypesproperty asList[str]but runtime type isList[DuckDBPyType]To Reproduce
OS:
x86_64 GNU/Linux
DuckDB Package Version:
1.4.3
Python Version:
3.11.9
Full Name:
Ashwin A Nayar
Affiliation:
Corridor Platforms
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?
Not applicable - the reproduction does not require a data set
Did you include all code required to reproduce the issue?
Did you include all relevant configuration to reproduce the issue?