From 4f5ba8c5967bc9b3ddfe07b3a98af545fb3bf0ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Frederik=20Hvilsh=C3=B8j?= Date: Thu, 19 Dec 2024 13:52:52 +0100 Subject: [PATCH] docs: make docs display CORS middleware in reference section --- docs/reference/editor_agents.md | 2 +- encord_agents/fastapi/cors.py | 2 +- encord_agents/fastapi/utils.py | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/docs/reference/editor_agents.md b/docs/reference/editor_agents.md index e15634b..8cb61a5 100644 --- a/docs/reference/editor_agents.md +++ b/docs/reference/editor_agents.md @@ -9,7 +9,7 @@ ## FastAPI -::: encord_agents.fastapi.dependencies +::: encord_agents.fastapi options: show_if_no_docstring: false show_subodules: false diff --git a/encord_agents/fastapi/cors.py b/encord_agents/fastapi/cors.py index 8777cf6..87d7894 100644 --- a/encord_agents/fastapi/cors.py +++ b/encord_agents/fastapi/cors.py @@ -21,7 +21,7 @@ class EncordCORSMiddleware(CORSMiddleware): """ Like a regular `fastapi.midleware.cors.CORSMiddleware` but matches against - the encord origin by default. + the Encord origin by default. **Example:** ```python diff --git a/encord_agents/fastapi/utils.py b/encord_agents/fastapi/utils.py index b63c34b..9c1cbaf 100644 --- a/encord_agents/fastapi/utils.py +++ b/encord_agents/fastapi/utils.py @@ -1,7 +1,5 @@ import os -from pydantic import ValidationError - from encord_agents.core.settings import Settings from encord_agents.core.utils import get_user_client from encord_agents.exceptions import PrintableError @@ -20,7 +18,7 @@ def verify_auth() -> None: on_startup=[verify_auth] ``` - This will make the server fail early if auth is not setup. + This will make the server fail early if auth is not set up. """ from datetime import datetime, timedelta