diff --git a/compendium_v2/__init__.py b/compendium_v2/__init__.py index a4c90406a84dace0cd4286b0a2afbd1e7771f85f..28dcaa14370e16802a25d735cbaffb3b6a175dc6 100644 --- a/compendium_v2/__init__.py +++ b/compendium_v2/__init__.py @@ -7,8 +7,7 @@ import os from flask import Flask from flask_cors import CORS # for debugging -from compendium_v2 import environment -from compendium_v2 import config +from compendium_v2 import config, environment def create_app(): diff --git a/compendium_v2/environment.py b/compendium_v2/environment.py index 6c05da27f0e94fe10ac5c37be7081a4a77b500b1..8b9d025e251892da6f98a2c757bd4220fcc9beb7 100644 --- a/compendium_v2/environment.py +++ b/compendium_v2/environment.py @@ -2,7 +2,6 @@ import json import logging.config import os - LOGGING_DEFAULT_CONFIG = { 'version': 1, 'disable_existing_loggers': False, diff --git a/compendium_v2/routes/api.py b/compendium_v2/routes/api.py index 7d224944bad6e49b444daa8e7c73f419bff4eff7..3adc75f7c3eabcfd855a3f23e87316ba65f77330 100644 --- a/compendium_v2/routes/api.py +++ b/compendium_v2/routes/api.py @@ -16,6 +16,7 @@ import random import time from flask import Blueprint, jsonify + from compendium_v2.routes import common routes = Blueprint("compendium-v2-api", __name__) diff --git a/compendium_v2/routes/common.py b/compendium_v2/routes/common.py index a2fcf12030760b73caef4521b2fbad4cc266c7f7..519b6f6bd188655fca9fd9d34f90af210d1a771b 100644 --- a/compendium_v2/routes/common.py +++ b/compendium_v2/routes/common.py @@ -3,7 +3,8 @@ Utilities used by multiple route blueprints. """ import functools import logging -from flask import request, Response + +from flask import Response, request logger = logging.getLogger(__name__) _DECODE_TYPE_XML = 'xml' diff --git a/compendium_v2/routes/default.py b/compendium_v2/routes/default.py index 806f8e4bc8873f9c4faa3cd3c592ab864cc2f4bf..7211bb4e0571519c04d7b90dae93a35ff41cba32 100644 --- a/compendium_v2/routes/default.py +++ b/compendium_v2/routes/default.py @@ -11,8 +11,8 @@ Default Endpoints """ import pkg_resources - from flask import Blueprint, jsonify, render_template + from compendium_v2.routes import common routes = Blueprint("compendium-v2-default", __name__) diff --git a/compendium_v2/routes/service_matrix.py b/compendium_v2/routes/service_matrix.py index 41066b8e86b344d931d33c95c89cc558218bfb45..0f642c4a182670487455cb83c9ae132ddf2da627 100644 --- a/compendium_v2/routes/service_matrix.py +++ b/compendium_v2/routes/service_matrix.py @@ -15,9 +15,10 @@ These endpoints are intended for getting service matrix. import json import logging import os + from flask import Blueprint -from compendium_v2.routes import common +from compendium_v2.routes import common SERVICE_MATRIX_SCHEMA = { '$schema': 'http://json-schema.org/draft-07/schema#', diff --git a/tox.ini b/tox.ini index 55092243affc1ddb6cabb1a6f4c6c10be134b0df..a870b92a3ac52d23802de1598d7324e5683caf30 100644 --- a/tox.ini +++ b/tox.ini @@ -9,6 +9,7 @@ exclude = ./.tox,./webapp deps = coverage flake8 + isort -r requirements.txt commands = @@ -18,5 +19,6 @@ commands = coverage html coverage report --fail-under 85 flake8 + isort -c --df compendium_v2 sphinx-build -M html docs/source docs/build