mkleehammer / pyodbc

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

Designate connection string argument type as optional #987

Closed ajnelson-nist closed 2 years ago

ajnelson-nist commented 2 years ago

The signature for pyodbc.connect() designates the connection string as required. However, the implementation in src/pyodbcmodule.cpp mod_connect permits the string to be absent if there are no positional arguments, relying instead on only keyword arguments. The doc string in src/pyodbcmodule.cpp connect_doc also confirms the string may be optionally supplied.

This patch updates the type signature to reflect the implementation and documentation.

Signed-off-by: Alex Nelson alexander.nelson@nist.gov

ajnelson-nist commented 2 years ago

Thank you!