mkleehammer / pyodbc

Python ODBC bridge
https://github.com/mkleehammer/pyodbc/wiki
MIT No Attribution
2.88k stars 562 forks source link

Add typing for Connection, Cursor, and connect parameters #1127

Closed baluyotraf closed 1 year ago

baluyotraf commented 1 year ago

Hello!

We are using pyright with pyodbc in our library. On strict settings, pyright complains about some of the functions/classes that they have unknown typing. Adding the types on variable arguments and in attrs_before fixes the issue.

The attrs_before keys and values right typing looks Dict[str, Any] but I started the commit with Dict[Any, Any] to be safe.