This is an archive of the discontinued LLVM Phabricator instance.

Fix type hint for add_column in lnt.server.db.util
ClosedPublic

Authored by thopre on Jan 20 2021, 10:10 AM.

Details

Summary

statement variable in lnt.server.db.util's add_column method is of type
DDLElement. As per [1], the bind argument of its execute() method is
optional and take "an Engine or Connection". This commit updates
add_column's type hint accordingly.

[1]
https://docs.sqlalchemy.org/en/13/core/ddl.html#sqlalchemy.schema.DDLElement.execute

Diff Detail

Repository
rLNT LNT

Event Timeline

thopre created this revision.Jan 20 2021, 10:10 AM
thopre requested review of this revision.Jan 20 2021, 10:10 AM
This revision is now accepted and ready to land.Jan 20 2021, 10:19 AM
This revision was automatically updated to reflect the committed changes.