Fix linting issues: line length, import sorting, unused variables
- Set ruff/black line length to 120 - Reformatted code with black - Fixed import ordering with ruff - Disabled lint for UI component files with long CSS strings - Updated pyproject.toml with proper tool configuration
This commit is contained in:
11
app/main.py
11
app/main.py
@@ -14,8 +14,8 @@ from fastapi import FastAPI, Request, WebSocket, WebSocketDisconnect
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from nicegui import ui
|
||||
|
||||
from app.api.routes import router as api_router
|
||||
import app.pages # noqa: F401
|
||||
from app.api.routes import router as api_router
|
||||
from app.services.cache import CacheService
|
||||
from app.services.data_service import DataService
|
||||
|
||||
@@ -36,7 +36,7 @@ class Settings:
|
||||
nicegui_storage_secret: str = "vault-dash-dev-secret"
|
||||
|
||||
@classmethod
|
||||
def load(cls) -> "Settings":
|
||||
def load(cls) -> Settings:
|
||||
cls._load_dotenv()
|
||||
origins = os.getenv("CORS_ORIGINS", "*")
|
||||
return cls(
|
||||
@@ -169,4 +169,9 @@ ui.run_with(
|
||||
if __name__ in {"__main__", "__mp_main__"}:
|
||||
import uvicorn
|
||||
|
||||
uvicorn.run("app.main:app", host="0.0.0.0", port=8000, reload=settings.environment == "development")
|
||||
uvicorn.run(
|
||||
"app.main:app",
|
||||
host="0.0.0.0",
|
||||
port=8000,
|
||||
reload=settings.environment == "development",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user