From 443607774d3a75419d32e3415cc0b2ab151a6362 Mon Sep 17 00:00:00 2001
From: Ian Galpin <ian.galpin@geant.org>
Date: Wed, 16 Nov 2022 13:27:03 +0000
Subject: [PATCH] Applied isort recommendations
---
compendium_v2/__init__.py | 3 +--
compendium_v2/environment.py | 1 -
compendium_v2/routes/api.py | 1 +
compendium_v2/routes/common.py | 3 ++-
compendium_v2/routes/default.py | 2 +-
compendium_v2/routes/service_matrix.py | 3 ++-
tox.ini | 2 ++
7 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/compendium_v2/__init__.py b/compendium_v2/__init__.py
index a4c90406..28dcaa14 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 6c05da27..8b9d025e 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 7d224944..3adc75f7 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 a2fcf120..519b6f6b 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 806f8e4b..7211bb4e 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 41066b8e..0f642c4a 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 55092243..a870b92a 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
--
GitLab