diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index b61d20f8..342952d6 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -38,6 +38,10 @@ jobs: - name: Run Flake8 run: python -m flake8 --config=.flake8 app.py + # Step 7: Fix imports with Isort + - name: Fix with Isort + run: python -m isort app.py + # Step 7: Run Black Check for app.py - name: Run Black Check run: python -m black --check app.py diff --git a/app.py b/app.py index a415b273..7c60cfec 100644 --- a/app.py +++ b/app.py @@ -6,21 +6,32 @@ import httpx from azure.core.credentials import AzureKeyCredential -from azure.identity.aio import (DefaultAzureCredential, - get_bearer_token_provider) +from azure.identity.aio import DefaultAzureCredential, get_bearer_token_provider from azure.search.documents import SearchClient from openai import AsyncAzureOpenAI -from quart import (Blueprint, Quart, jsonify, make_response, render_template, - request, send_from_directory) +from quart import ( + Blueprint, + Quart, + jsonify, + make_response, + render_template, + request, + send_from_directory, +) from backend.auth.auth_utils import get_authenticated_user_details from backend.history.cosmosdbservice import CosmosConversationClient from backend.security.ms_defender_utils import get_msdefender_user_json from backend.settings import ( - MINIMUM_SUPPORTED_AZURE_OPENAI_PREVIEW_API_VERSION, app_settings) -from backend.utils import (ChatType, format_as_ndjson, - format_non_streaming_response, - format_stream_response) + MINIMUM_SUPPORTED_AZURE_OPENAI_PREVIEW_API_VERSION, + app_settings, +) +from backend.utils import ( + ChatType, + format_as_ndjson, + format_non_streaming_response, + format_stream_response, +) bp = Blueprint("routes", __name__, static_folder="static", template_folder="static")