Open senese opened 1 month ago
Can reproduce, with base SQLAlchemy.
from sqlalchemy.orm import Session
from sqlalchemy.ext.declarative import DeclarativeMeta, declarative_base
from sqlalchemy import Column, String
Base: DeclarativeMeta = declarative_base()
class Data(Base):
__tablename__ = "data"
id = Column(String(30), primary_key=True, index=True)
def test_func(db: Session):
db.add(Data(id="testid"))
I also want to point it out that when using unpacking syntax it doesn't raise any warnings or errors:
Environment data
Code Snippet
Output:
<User (transient 139732127139744)>
Expected behavior
No red squiggly lines around User to warn about error "Expected no arguments to "User" constructor". I've seen #507 and for SQL Alchemy models there's no squiggly lines but this isn't true for Flask-SQLAlchemy models, even if following Flask documentation.
Actual behavior