Skip to content

Commit

Permalink
Update BaseSettings and add types
Browse files Browse the repository at this point in the history
  • Loading branch information
Rooyca committed Jul 12, 2023
1 parent 798eec8 commit e9c0972
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
from typing import Any

from fastapi.responses import HTMLResponse
from pydantic import BaseSettings
from pydantic_settings import BaseSettings
from typing import Any

APP_DIR = Path(__file__).resolve().parent

Expand All @@ -14,14 +15,14 @@ class Settings(BaseSettings):
STATIC_DIR: Path = APP_DIR / "static"
TEMPLATE_DIR: Path = APP_DIR / "templates"

FASTAPI_PROPERTIES = {
FASTAPI_PROPERTIES: dict[str, Any] = {
"title": "Simple Site",
"description": "A simple htmx and tailwind site built with FastAPI",
"version": "0.0.1",
"default_response_class": HTMLResponse, # Change default from JSONResponse
}

DISABLE_DOCS = True
DISABLE_DOCS: bool = True

@property
def fastapi_kwargs(self) -> dict[str, Any]:
Expand Down

0 comments on commit e9c0972

Please sign in to comment.