We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLAlchemy allows defining models as follows:
from sqlalchemy import Column, Integer, String from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() class BaseModel(Base): __abstract__ = True id = Column(Integer, primary_key=True) name = Column(String(50)) class MyModel(BaseModel): __tablename__ = 'my-model' whatever = Column(String)
Then you can create new instances as expected:
MyModel(name='the name', whatever='something here')
When doing that, Mypy reports:
error: Unexpected column "name" for model "MyModel"
It appears the stubs in this project don't let Mypy follow model inheritance?
This is with sqlalchemy-stubs==0.2
The text was updated successfully, but these errors were encountered:
Ah, it seems this is fixed in master by #80 .
Apologies for the noise, I should have tested with master before reporting.
Now I'm eagerly waiting for 0.3. 🙂
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
SQLAlchemy allows defining models as follows:
Then you can create new instances as expected:
When doing that, Mypy reports:
It appears the stubs in this project don't let Mypy follow model inheritance?
This is with sqlalchemy-stubs==0.2
The text was updated successfully, but these errors were encountered: