[LNT] r311698 - Unused + type annotation cleanups
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 24 13:28:56 PDT 2017
Author: cmatthews
Date: Thu Aug 24 13:28:56 2017
New Revision: 311698
URL: http://llvm.org/viewvc/llvm-project?rev=311698&view=rev
Log:
Unused + type annotation cleanups
Modified:
lnt/trunk/lnt/server/db/util.py
Modified: lnt/trunk/lnt/server/db/util.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/db/util.py?rev=311698&r1=311697&r2=311698&view=diff
==============================================================================
--- lnt/trunk/lnt/server/db/util.py (original)
+++ lnt/trunk/lnt/server/db/util.py Thu Aug 24 13:28:56 2017
@@ -1,8 +1,9 @@
import sqlalchemy
import sqlalchemy.ext.compiler
-import re
+from sqlalchemy.engine.interfaces import Connectable
from sqlalchemy.schema import DDLElement
from sqlalchemy.ext.compiler import compiles
+from typing import Text
def path_has_no_database_type(path):
@@ -16,15 +17,14 @@ class _AddColumn(DDLElement):
@compiles(_AddColumn)
-def _visit_add_column(element, compiler, **kw):
+def _visit_add_column(element, compiler, **_):
return ("ALTER TABLE %s ADD COLUMN %s" %
(compiler.preparer.quote(element.table_name),
compiler.get_column_specification(element.column)))
def add_column(connectable, table_name, column):
- # type: (sqlalchemy.Connectable, sqlalchemy.Table, sqlalchemy.Column)
- # -> None
+ # type: (Connectable, Text, sqlalchemy.Column) -> None
"""Add this column to the table named `table_name`.
This is a stopgap to a real migration system. Inspect the Column pass
More information about the llvm-commits
mailing list