dropbox / sqlalchemy-stubs

Mypy plugin and stubs for SQLAlchemy
Apache License 2.0
572 stars 102 forks source link

add delete method on scoped_session #251

Open burnettk opened 2 years ago

burnettk commented 2 years ago

for this sort of code:

user = UserModel.query.filter_by(username="awesomeuser").first()
db.session.delete(user)  # type: ignore, until now
db.session.commit()

not sure if it's a new issue in some version of sqlalchemy. i'm on SQLAlchemy-1.4.42 and Flask-SQLAlchemy-3.0.2.

CLAassistant commented 2 years ago

CLA assistant check
All committers have signed the CLA.