diff --git a/init_db.py b/init_db.py index e434253f6..b987dbcd2 100644 --- a/init_db.py +++ b/init_db.py @@ -14,13 +14,14 @@ # License for the specific language governing permissions and limitations # under the License. +import server.db.api as api from server.db.models import Environment from server.db.models import File from server.db.models import Job from server.db.models import Platform from server.db.models import Scenario from server.db.models import session -import server.db.api as api + session.query(Job).delete() session.query(File).delete() diff --git a/server/__init__.py b/server/__init__.py index faaaf799c..e69de29bb 100644 --- a/server/__init__.py +++ b/server/__init__.py @@ -1,3 +0,0 @@ -# -*- coding: utf-8 -*- - - diff --git a/server/api/__init__.py b/server/api/__init__.py index 8b1378917..e69de29bb 100644 --- a/server/api/__init__.py +++ b/server/api/__init__.py @@ -1 +0,0 @@ - diff --git a/server/db/api.py b/server/db/api.py index acb2a44bc..791c6c828 100644 --- a/server/db/api.py +++ b/server/db/api.py @@ -20,9 +20,9 @@ from server.db.models import Environment from server.db.models import File from server.db.models import Job +from server.db.models import Jobstate from server.db.models import Platform from server.db.models import Scenario -from server.db.models import Jobstate from server.db.models import session diff --git a/server/db/models.py b/server/db/models.py index 3829794d5..da4e48c66 100644 --- a/server/db/models.py +++ b/server/db/models.py @@ -14,10 +14,10 @@ # License for the specific language governing permissions and limitations # under the License. -from sqlalchemy.ext.automap import automap_base -from sqlalchemy.orm import Session from sqlalchemy import create_engine +from sqlalchemy.ext.automap import automap_base from sqlalchemy import MetaData +from sqlalchemy.orm import Session engine = create_engine("postgresql://boa:boa@localhost:5432/dci_control_server") diff --git a/test-requirements.txt b/test-requirements.txt index a59c78db4..3f5e1c61d 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,4 +1,6 @@ -flake8>=2.1.0 +flake8==2.2.4 +pep8==1.5.7 +mccabe==0.2.1 hacking>=0.10.1 mock>=1.0.1 pytest>=2.6.2 diff --git a/tox.ini b/tox.ini index 6a269c951..a2ce96302 100644 --- a/tox.ini +++ b/tox.ini @@ -20,6 +20,6 @@ commands = py.test --cov-report html --cov server [flake8] -ignore = H405,H304 +ignore = H405,H304,H104 exclude=.venv,.git,.tox,dist,*egg,*.egg-info,build,examples,doc show-source = True