Added Ruff linting
This commit is contained in:
1 parent
52dcdfd361
commit
5b77b8875e
7 files changed
+55
-22
No files matched your search
+14
-13
@@ -1,16 +1,17 @@
|
||||
from fastapi import FastAPI, Depends, HTTPException, Response, Request
|
||||
import uvicorn
|
||||
from github_api import find_package_version_with_tag as find_package_version_with_tag_github
|
||||
from dockerhub_api import find_package_version_with_tag as find_package_version_with_tag_dockerhub
|
||||
import uvicorn
|
||||
from contextlib import asynccontextmanager
|
||||
from db_module import get_db, create_connection_pool, close_connection_pool, start_healthcheck_thread
|
||||
from simple_logger_handler import setup_logger, LOG_LEVEL
|
||||
from send_notification import send_notification
|
||||
from metrics_server import REQUEST_COUNTER
|
||||
import asyncio
|
||||
from uvicorn_logger_config import LOGGING_CONFIG
|
||||
from contextlib import asynccontextmanager
|
||||
|
||||
import uvicorn
|
||||
from fastapi import Depends, FastAPI, HTTPException, Request, Response
|
||||
|
||||
from db_module import close_connection_pool, create_connection_pool, get_db, start_healthcheck_thread
|
||||
from dockerhub_api import find_package_version_with_tag as find_package_version_with_tag_dockerhub
|
||||
from github_api import find_package_version_with_tag as find_package_version_with_tag_github
|
||||
from metrics_server import REQUEST_COUNTER
|
||||
from secret_manager import cleanup_secret_files
|
||||
from send_notification import send_notification
|
||||
from simple_logger_handler import LOG_LEVEL, setup_logger
|
||||
from uvicorn_logger_config import LOGGING_CONFIG
|
||||
|
||||
logger = setup_logger(__name__)
|
||||
|
||||
@@ -103,7 +104,7 @@ def handle_suwayomi(
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"[App] Error in Suwayomi handler: {e}", exc_info=True)
|
||||
raise HTTPException(status_code=500, detail=str(e))
|
||||
raise HTTPException(status_code=500, detail=str(e)) from e
|
||||
|
||||
|
||||
|
||||
@@ -138,7 +139,7 @@ def handle_pihole(
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"[App] Error in Pi-hole handler: {e}", exc_info=True)
|
||||
raise HTTPException(status_code=500, detail=str(e))
|
||||
raise HTTPException(status_code=500, detail=str(e)) from e
|
||||
|
||||
|
||||
async def start_servers():
|
||||
|
||||
Reference in new issue
Block a user