aboutsummaryrefslogtreecommitdiff
path: root/lnt/server
diff options
context:
space:
mode:
authorChris Matthews <cmatthews5@apple.com>2018-12-20 18:25:43 +0000
committerChris Matthews <cmatthews5@apple.com>2018-12-20 18:25:43 +0000
commit8f454bcdbc3168422181a8af7d212cfd48d0f4f3 (patch)
tree8459671e1b74fd3b599bd9d7b1f52cfa29d5a267 /lnt/server
parent1e618f13c008e090d9fe27b67847a1b011720f8a (diff)
Imports fixups
git-svn-id: https://llvm.org/svn/llvm-project/lnt/trunk@349787 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lnt/server')
-rw-r--r--lnt/server/db/fieldchange.py2
-rw-r--r--lnt/server/db/migrations/upgrade_10_to_11.py2
-rw-r--r--lnt/server/db/migrations/upgrade_1_to_2.py3
-rw-r--r--lnt/server/db/migrations/upgrade_2_to_3.py6
-rw-r--r--lnt/server/db/migrations/upgrade_3_to_4.py1
-rw-r--r--lnt/server/db/migrations/upgrade_5_to_6.py2
-rw-r--r--lnt/server/db/migrations/upgrade_7_to_8.py6
-rw-r--r--lnt/server/db/migrations/upgrade_8_to_9.py3
-rw-r--r--lnt/server/ui/app.py1
9 files changed, 7 insertions, 19 deletions
diff --git a/lnt/server/db/fieldchange.py b/lnt/server/db/fieldchange.py
index 1532039..0736c97 100644
--- a/lnt/server/db/fieldchange.py
+++ b/lnt/server/db/fieldchange.py
@@ -1,5 +1,5 @@
import difflib
-import sqlalchemy.sql
+
from sqlalchemy.orm import joinedload
from sqlalchemy.orm.session import Session
from sqlalchemy.orm.exc import ObjectDeletedError
diff --git a/lnt/server/db/migrations/upgrade_10_to_11.py b/lnt/server/db/migrations/upgrade_10_to_11.py
index 7be71b6..0326210 100644
--- a/lnt/server/db/migrations/upgrade_10_to_11.py
+++ b/lnt/server/db/migrations/upgrade_10_to_11.py
@@ -2,7 +2,7 @@
# for Regression Tracking features.
import sqlalchemy
-from sqlalchemy import *
+from sqlalchemy import String, Integer, Column, ForeignKey
from sqlalchemy.orm import relation
# Import the original schema from upgrade_0_to_1 since upgrade_1_to_2 does not
diff --git a/lnt/server/db/migrations/upgrade_1_to_2.py b/lnt/server/db/migrations/upgrade_1_to_2.py
index 3601872..f2aeb89 100644
--- a/lnt/server/db/migrations/upgrade_1_to_2.py
+++ b/lnt/server/db/migrations/upgrade_1_to_2.py
@@ -9,12 +9,11 @@
# extraction, and we recompute the run order for them.
import json
-import pprint
import re
from lnt.util import logger
import sqlalchemy
-from sqlalchemy import Table, MetaData, Column
+from sqlalchemy import Table, MetaData
def update_testsuite(engine, session, db_key_name):
diff --git a/lnt/server/db/migrations/upgrade_2_to_3.py b/lnt/server/db/migrations/upgrade_2_to_3.py
index 9cccf62..6325b94 100644
--- a/lnt/server/db/migrations/upgrade_2_to_3.py
+++ b/lnt/server/db/migrations/upgrade_2_to_3.py
@@ -1,12 +1,8 @@
# Version 3 of the database adds the FieldChange class to track flagged
# regressions in the database.
-import os
-import sys
-
import sqlalchemy
-from sqlalchemy import *
-from sqlalchemy.schema import Index
+from sqlalchemy import Integer, Column, ForeignKey
from sqlalchemy.orm import relation
# Import the original schema from upgrade_0_to_1 since upgrade_1_to_2 does not
diff --git a/lnt/server/db/migrations/upgrade_3_to_4.py b/lnt/server/db/migrations/upgrade_3_to_4.py
index 590884c..1496f1e 100644
--- a/lnt/server/db/migrations/upgrade_3_to_4.py
+++ b/lnt/server/db/migrations/upgrade_3_to_4.py
@@ -2,7 +2,6 @@
from sqlalchemy import Column, Integer
-from lnt.server.db.migrations.util import introspect_table
from lnt.server.db.util import add_column
diff --git a/lnt/server/db/migrations/upgrade_5_to_6.py b/lnt/server/db/migrations/upgrade_5_to_6.py
index d12002b..9e039b5 100644
--- a/lnt/server/db/migrations/upgrade_5_to_6.py
+++ b/lnt/server/db/migrations/upgrade_5_to_6.py
@@ -1,7 +1,7 @@
# Version 6 adds a "mem_bytes"" Sample type to "nts".
import sqlalchemy
-from sqlalchemy import *
+from sqlalchemy import Float, Column, update
from lnt.server.db.migrations.util import introspect_table
from lnt.server.db.util import add_column
diff --git a/lnt/server/db/migrations/upgrade_7_to_8.py b/lnt/server/db/migrations/upgrade_7_to_8.py
index 483621c..182ef9e 100644
--- a/lnt/server/db/migrations/upgrade_7_to_8.py
+++ b/lnt/server/db/migrations/upgrade_7_to_8.py
@@ -1,12 +1,8 @@
# Version 8 of the database updates FieldChanges as well as adds tables
# for Regression Tracking features.
-import os
-import sys
-
import sqlalchemy
-from sqlalchemy import *
-from sqlalchemy.schema import Index
+from sqlalchemy import Float, String, Integer, Column, ForeignKey
from sqlalchemy.orm import relation
# Import the original schema from upgrade_0_to_1 since upgrade_1_to_2 does not
diff --git a/lnt/server/db/migrations/upgrade_8_to_9.py b/lnt/server/db/migrations/upgrade_8_to_9.py
index 5bbd105..4ef9e0b 100644
--- a/lnt/server/db/migrations/upgrade_8_to_9.py
+++ b/lnt/server/db/migrations/upgrade_8_to_9.py
@@ -2,14 +2,13 @@
# adds Profiles.
import sqlalchemy
-from sqlalchemy import *
+from sqlalchemy import String, Integer, Column, DateTime
from sqlalchemy.orm import relation
# Import the original schema from upgrade_0_to_1 since upgrade_1_to_2 does not
# change the actual schema, but rather adds functionality vis-a-vis orders.
import lnt.server.db.migrations.upgrade_0_to_1 as upgrade_0_to_1
import lnt.server.db.migrations.upgrade_2_to_3 as upgrade_2_to_3
-from lnt.server.db.migrations.util import introspect_table
from lnt.server.db.util import add_column
diff --git a/lnt/server/ui/app.py b/lnt/server/ui/app.py
index c2914ef..5cffe42 100644
--- a/lnt/server/ui/app.py
+++ b/lnt/server/ui/app.py
@@ -16,7 +16,6 @@ from flask import request
from flask import jsonify
from flask import render_template
from flask_restful import Api
-from sqlalchemy.exc import DatabaseError
from sqlalchemy.ext.declarative import DeclarativeMeta
import lnt