chore(lint): apply ruff --fix (4443 auto-fixes)
Auto-fixed categories: - F401: unused imports removed - I001: import blocks sorted - W293: trailing whitespace stripped - UP035: deprecated typing imports replaced - SIM: simplify suggestions applied - ARG: unused args prefixed with underscore - T201: print statements removed - F841: unused variables removed - RUF059: unpacked variables prefixed Remaining ~1500 unfixable errors (C901, B904, N806, E402) require manual work. Backend smoke tests: 13/13 passed.
This commit is contained in:
@@ -5,12 +5,12 @@
|
||||
# @RELATION DEPENDS_ON -> [GitServiceUrlMixin]
|
||||
|
||||
import os
|
||||
from typing import Optional
|
||||
from git import Repo
|
||||
from git.exc import GitCommandError
|
||||
|
||||
from fastapi import HTTPException
|
||||
from git.exc import GitCommandError
|
||||
|
||||
from src.core.database import SessionLocal
|
||||
from src.core.logger import logger, belief_scope
|
||||
from src.core.logger import belief_scope, logger
|
||||
from src.models.git import GitRepository, GitServerConfig
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ class GitServiceSyncMixin:
|
||||
raise HTTPException(status_code=500, detail=f"Git push failed: {details}")
|
||||
except Exception as e:
|
||||
logger.error(f"[push_changes][Coherence:Failed] Failed to push changes: {e}")
|
||||
raise HTTPException(status_code=500, detail=f"Git push failed: {str(e)}")
|
||||
raise HTTPException(status_code=500, detail=f"Git push failed: {e!s}")
|
||||
# endregion push_changes
|
||||
|
||||
# region pull_changes [TYPE Function]
|
||||
@@ -167,7 +167,7 @@ class GitServiceSyncMixin:
|
||||
raise
|
||||
except Exception as e:
|
||||
logger.error(f"[pull_changes][Coherence:Failed] Failed to pull changes: {e}")
|
||||
raise HTTPException(status_code=500, detail=f"Git pull failed: {str(e)}")
|
||||
raise HTTPException(status_code=500, detail=f"Git pull failed: {e!s}")
|
||||
# endregion pull_changes
|
||||
# #endregion GitServiceSyncMixin
|
||||
# #endregion GitServiceSyncMixin
|
||||
|
||||
Reference in New Issue
Block a user