Index: lnt/server/db/migrations/upgrade_0_to_1.py =================================================================== --- lnt/server/db/migrations/upgrade_0_to_1.py +++ lnt/server/db/migrations/upgrade_0_to_1.py @@ -4,11 +4,11 @@ # versioning. import sqlalchemy +from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Float, String, Integer, Column, ForeignKey, Binary, DateTime from sqlalchemy.orm import relation -from sqlalchemy.ext.declarative import declarative_base -Base = declarative_base() # type: sqlalchemy.ext.declarative.api.DeclarativeMeta +Base = declarative_base() ### # Core Schema Index: lnt/server/db/migrations/upgrade_12_to_13.py =================================================================== --- lnt/server/db/migrations/upgrade_12_to_13.py +++ lnt/server/db/migrations/upgrade_12_to_13.py @@ -1,8 +1,9 @@ # Adds new table to store jsonschema previously used to construct testsuite. import sqlalchemy +from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import Column, String, Binary -Base = sqlalchemy.ext.declarative.declarative_base() +Base = declarative_base() class TestSuiteJSONSchema(Base): Index: mypy.ini =================================================================== --- /dev/null +++ mypy.ini @@ -0,0 +1,2 @@ +[mypy] +plugins = sqlmypy Index: tox.ini =================================================================== --- tox.ini +++ tox.ini @@ -29,6 +29,7 @@ skip_install = true deps = mypy + sqlalchemy-stubs commands = # No where close to passing yet, but nice to have. - mypy --junit-xml=junit-{envname}.xml --py2 --ignore-missing-imports lnt @@ -52,4 +53,4 @@ sphinx_bootstrap_theme commands = - make -C {toxinidir}/docs/ html \ No newline at end of file + make -C {toxinidir}/docs/ html