typeshed icon indicating copy to clipboard operation
typeshed copied to clipboard

add _sqlite3 module

Open tungol opened this issue 2 years ago • 2 comments

This aligns with the implementation while giving greater fidelity to runtime naming and inheritance

Related to https://github.com/python/typeshed/issues/3968 and https://github.com/python/typeshed/issues/11141

tungol avatar Dec 16 '23 21:12 tungol

Diff from mypy_primer, showing the effect of this PR on open source code:

paroxython (https://github.com/laowantong/paroxython)
+ paroxython/make_db.py:197: error: Module has no attribute "connect"  [attr-defined]

pandas (https://github.com/pandas-dev/pandas)
+ pandas/io/sql.py:2500: error: Module has no attribute "register_adapter"  [attr-defined]
+ pandas/io/sql.py:2502: error: Module has no attribute "register_adapter"  [attr-defined]
+ pandas/io/sql.py:2503: error: Module has no attribute "register_adapter"  [attr-defined]
+ pandas/io/sql.py:2508: error: Module has no attribute "register_converter"  [attr-defined]
+ pandas/io/sql.py:2509: error: Module has no attribute "register_converter"  [attr-defined]

mypy (https://github.com/python/mypy)
+ mypy/metastore.py:153: error: Module has no attribute "connect"  [attr-defined]
+ mypy/metastore.py:160: error: Returning Any from function declared to return "Connection"  [no-any-return]
+ mypy/metastore.py:160: note: See https://mypy.rtfd.io/en/stable/_refs.html#code-no-any-return for more info

openlibrary (https://github.com/internetarchive/openlibrary)
+ openlibrary/core/db.py:179: error: Module has no attribute "register_adapter"  [attr-defined]

operator (https://github.com/canonical/operator)
+ ops/storage.py:65: error: Module has no attribute "connect"  [attr-defined]

pandas-stubs (https://github.com/pandas-dev/pandas-stubs)
+ tests/test_io.py:1142: error: Module has no attribute "connect"  [attr-defined]
+ tests/test_io.py:1199: error: Module has no attribute "connect"  [attr-defined]
+ tests/test_io.py:1217: error: Module has no attribute "connect"  [attr-defined]
+ tests/test_io.py:1229: error: Module has no attribute "connect"  [attr-defined]
+ tests/test_io.py:1243: error: Module has no attribute "connect"  [attr-defined]
+ tests/test_io.py:1336: error: Module has no attribute "connect"  [attr-defined]
+ tests/test_io.py:1378: error: Module has no attribute "connect"  [attr-defined]
+ tests/test_io.py:1420: error: Module has no attribute "connect"  [attr-defined]
+ tests/test_io.py:1498: error: Module has no attribute "connect"  [attr-defined]
+ tests/test_io.py:1526: error: Module has no attribute "connect"  [attr-defined]

ibis (https://github.com/ibis-project/ibis)
+ ibis/backends/sqlite/__init__.py:125: error: Module has no attribute "register_adapter"  [attr-defined]

github-actions[bot] avatar Dec 16 '23 21:12 github-actions[bot]

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

github-actions[bot] avatar Dec 16 '23 22:12 github-actions[bot]