[LNT] r311698 - Unused + type annotation cleanups
Chris Matthews via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 28 11:20:24 PDT 2017
PyCharm is checking them for me. I believe they are checked by a number of other packages, including MyPy.
> On Aug 24, 2017, at 2:56 PM, Matthias Braun <mbraun at apple.com> wrote:
>
> Out of interest are those type annotations just for documentation purposes or are they machine checkable somehow?
>
>> On Aug 24, 2017, at 1:28 PM, Chris Matthews via llvm-commits <llvm-commits at lists.llvm.org> wrote:
>>
>> 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
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list