fix: auto-fix code issues (cron)
- 修复重复导入/字段 - 修复异常处理 - 修复PEP8格式问题 - 添加类型注解
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -2381,8 +2381,6 @@ async def create_attribute_template_endpoint(
|
|||||||
if not DB_AVAILABLE:
|
if not DB_AVAILABLE:
|
||||||
raise HTTPException(status_code=500, detail="Database not available")
|
raise HTTPException(status_code=500, detail="Database not available")
|
||||||
|
|
||||||
from db_manager import AttributeTemplate
|
|
||||||
|
|
||||||
db = get_db_manager()
|
db = get_db_manager()
|
||||||
project = db.get_project(project_id)
|
project = db.get_project(project_id)
|
||||||
if not project:
|
if not project:
|
||||||
@@ -2602,8 +2600,6 @@ async def batch_set_entity_attributes_endpoint(
|
|||||||
if not DB_AVAILABLE:
|
if not DB_AVAILABLE:
|
||||||
raise HTTPException(status_code=500, detail="Database not available")
|
raise HTTPException(status_code=500, detail="Database not available")
|
||||||
|
|
||||||
from db_manager import EntityAttribute
|
|
||||||
|
|
||||||
db = get_db_manager()
|
db = get_db_manager()
|
||||||
entity = db.get_entity(entity_id)
|
entity = db.get_entity(entity_id)
|
||||||
if not entity:
|
if not entity:
|
||||||
@@ -8667,8 +8663,6 @@ async def get_branding_css(tenant_id: str):
|
|||||||
manager = get_tenant_manager()
|
manager = get_tenant_manager()
|
||||||
css = manager.get_branding_css(tenant_id)
|
css = manager.get_branding_css(tenant_id)
|
||||||
|
|
||||||
from fastapi.responses import PlainTextResponse
|
|
||||||
|
|
||||||
return PlainTextResponse(content=css, media_type="text/css")
|
return PlainTextResponse(content=css, media_type="text/css")
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,6 @@ class SecurityManager:
|
|||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, db_path: str = "insightflow.db"):
|
def __init__(self, db_path: str = "insightflow.db"):
|
||||||
self.db_path = db_path
|
|
||||||
self.db_path = db_path
|
self.db_path = db_path
|
||||||
# 预编译正则缓存
|
# 预编译正则缓存
|
||||||
self._compiled_patterns: dict[str, re.Pattern] = {}
|
self._compiled_patterns: dict[str, re.Pattern] = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user