[lint] more linting changes

This commit is contained in:
2026-07-29 03:30:54 +02:00
parent 3f20cdeed9
commit 7a70b6b1d4
6 changed files with 28 additions and 14 deletions

View File

@@ -69,7 +69,7 @@ def del_card(
logger.info(f"The key:'{key}' was not found in db!")
raise HTTPException(
status.HTTP_500_INTERNAL_SERVER_ERROR,
detail="Key on card not found in DB. Please tell an admin about this. KEY={key}",
detail="Key on card not found in DB. Please tell an admin about this. KEY={key}", # noqa: E501
)
db.delete(card)
db.commit()

View File

@@ -1,6 +1,4 @@
import logging
logger = logging.getLogger(__name__)
import os
from contextlib import asynccontextmanager
@@ -11,6 +9,7 @@ from fastapi.security import OAuth2PasswordBearer
load_dotenv()
# ruff: disable[E402]
from app.controllers import (
aaManager,
cardManager,
@@ -24,6 +23,10 @@ from app.services.database import create_db_and_tables, get_db_session
from app.services.scanner import BackgroundScanner
from app.services.settings import verify_settings
# ruff: enable[E402]
logger = logging.getLogger(__name__)
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
scanner = BackgroundScanner(db=get_db_session())
logging.basicConfig(level=logging.INFO)

View File

@@ -17,7 +17,7 @@ def verify_settings():
"DISABLE_CARDS"
):
raise ValueError(
f"Missing environment variable for scanner start: {setting} \n Run with DISABLE_CARDS env var to disable cards"
f"Missing environment variable for scanner start: {setting} \n Run with DISABLE_CARDS env var to disable cards" # noqa: E501
)
for setting in important_envs:
if setting not in os.environ or setting == "":