dropbox / sqlalchemy-stubs

Mypy plugin and stubs for SQLAlchemy
Apache License 2.0
570 stars 101 forks source link

table() schema argument not supported #226

Open rectalogic opened 2 years ago

rectalogic commented 2 years ago

Given this file:

import sqlalchemy as sa

sa.table("foo", schema="bar")

mypy with sqlalchemy-stubs plugin fails with:

$ mypy s.py
s.py:3: error: Unexpected keyword argument "schema" for "TableClause"
/site/venv/lib/python3.8/site-packages/sqlalchemy-stubs/sql/selectable.pyi:161: note: "TableClause" defined here
Found 1 error in 1 file (checked 1 source file)

https://docs.sqlalchemy.org/en/14/core/selectable.html#sqlalchemy.sql.expression.table

$ mypy --version
mypy 0.910
$ pip show sqlalchemy-stubs
Name: sqlalchemy-stubs
Version: 0.4
Summary: SQLAlchemy stubs and mypy plugin
Home-page: https://github.com/dropbox/sqlalchemy-stubs
Author: Ivan Levkivskyi
Author-email: levkivskyi@gmail.com
License: MIT License
Location: /site/venv/lib/python3.8/site-packages
Requires: typing-extensions, mypy
Required-by:
$ pip show sqlalchemy
Name: SQLAlchemy
Version: 1.4.23
Summary: Database Abstraction Library
Home-page: https://www.sqlalchemy.org
Author: Mike Bayer
Author-email: mike_mp@zzzcomputing.com
License: MIT
Location: /site/venv/lib/python3.8/site-packages
Requires: greenlet
Required-by: sqlalchemy-views, sqlalchemy-redshift