Closed
Description
- What version of Python are you using?
> python --version --version
Python 3.11.2 (main, Feb 13 2023, 17:10:22) [Clang 14.0.0 (clang-1400.0.29.202)]
- What operating system and processor architecture are you using?
> python -c 'import platform; print(platform.platform())'
macOS-13.2.1-arm64-arm-64bit
- What are the component versions in the environment (
pip freeze
)?
> python -m pip freeze | grep -E 'mypy=|snowflake'
mypy==1.0.1
snowflake-connector-python==3.0.1
- What did you do?
Ran mypy against our code using snowflake-connector-python
-
What did you expect to see?
No error
-
Can you set logging to DEBUG and collect the logs?
N/A
In the 3.0.1 release the fetchmany
and fetchall
method got their return types updated to list[dict | tuple | None]
. This is actually incorrect since they both contain logic to exclude row values that are None
. Our own code is expecting lists of dicts or tuples explicitly and the possibility of getting None row is breaking mypy.
The return types should be list[dict | tuple]
.