fix: auto-fix code issues (cron)
- 添加类型注解到单例管理器函数 - 修复代码格式问题
This commit is contained in:
@@ -233,3 +233,7 @@
|
||||
- 第 535 行: line_too_long
|
||||
- 第 573 行: line_too_long
|
||||
- ... 还有 2 个类似问题
|
||||
|
||||
## Git 提交结果
|
||||
|
||||
✅ 提交并推送成功
|
||||
|
||||
@@ -849,27 +849,27 @@ KIMI_API_KEY = os.getenv("KIMI_API_KEY", "")
|
||||
KIMI_BASE_URL = os.getenv("KIMI_BASE_URL", "https://api.kimi.com/coding")
|
||||
|
||||
# Phase 3: Entity Aligner singleton
|
||||
_aligner = None
|
||||
_aligner: "EntityAligner | None" = None
|
||||
|
||||
def get_aligner():
|
||||
def get_aligner() -> "EntityAligner | None":
|
||||
global _aligner
|
||||
if _aligner is None and ALIGNER_AVAILABLE:
|
||||
_aligner = EntityAligner()
|
||||
return _aligner
|
||||
|
||||
# Phase 3: Document Processor singleton
|
||||
_doc_processor = None
|
||||
_doc_processor: "DocumentProcessor | None" = None
|
||||
|
||||
def get_doc_processor():
|
||||
def get_doc_processor() -> "DocumentProcessor | None":
|
||||
global _doc_processor
|
||||
if _doc_processor is None and DOC_PROCESSOR_AVAILABLE:
|
||||
_doc_processor = DocumentProcessor()
|
||||
return _doc_processor
|
||||
|
||||
# Phase 7 Task 4: Collaboration Manager singleton
|
||||
_collaboration_manager = None
|
||||
_collaboration_manager: "CollaborationManager | None" = None
|
||||
|
||||
def get_collab_manager():
|
||||
def get_collab_manager() -> "CollaborationManager | None":
|
||||
global _collaboration_manager
|
||||
if _collaboration_manager is None and COLLABORATION_AVAILABLE:
|
||||
db = get_db_manager() if DB_AVAILABLE else None
|
||||
@@ -3626,9 +3626,9 @@ async def system_status():
|
||||
# ==================== Phase 7: Workflow Automation Endpoints ====================
|
||||
|
||||
# Workflow Manager singleton
|
||||
_workflow_manager = None
|
||||
_workflow_manager: "WorkflowManager | None" = None
|
||||
|
||||
def get_workflow_manager_instance():
|
||||
def get_workflow_manager_instance() -> "WorkflowManager | None":
|
||||
global _workflow_manager
|
||||
if _workflow_manager is None and WORKFLOW_AVAILABLE and DB_AVAILABLE:
|
||||
from workflow_manager import WorkflowManager
|
||||
@@ -5133,9 +5133,9 @@ class WebDAVSyncResult(BaseModel):
|
||||
error: str | None = None
|
||||
|
||||
# Plugin Manager singleton
|
||||
_plugin_manager_instance = None
|
||||
_plugin_manager_instance: "PluginManager | None" = None
|
||||
|
||||
def get_plugin_manager_instance():
|
||||
def get_plugin_manager_instance() -> "PluginManager | None":
|
||||
global _plugin_manager_instance
|
||||
if _plugin_manager_instance is None and PLUGIN_MANAGER_AVAILABLE and DB_AVAILABLE:
|
||||
db = get_db_manager()
|
||||
@@ -11849,9 +11849,9 @@ class CreateTeamIncentiveRequest(BaseModel):
|
||||
valid_until: str
|
||||
|
||||
# Growth Manager singleton
|
||||
_growth_manager = None
|
||||
_growth_manager: "GrowthManager | None" = None
|
||||
|
||||
def get_growth_manager_instance():
|
||||
def get_growth_manager_instance() -> "GrowthManager | None":
|
||||
global _growth_manager
|
||||
if _growth_manager is None and GROWTH_MANAGER_AVAILABLE:
|
||||
_growth_manager = GrowthManager()
|
||||
@@ -12658,9 +12658,9 @@ class PortalConfigCreate(BaseModel):
|
||||
api_base_url: str = "https://api.insightflow.io"
|
||||
|
||||
# Developer Ecosystem Manager singleton
|
||||
_developer_ecosystem_manager = None
|
||||
_developer_ecosystem_manager: "DeveloperEcosystemManager | None" = None
|
||||
|
||||
def get_developer_ecosystem_manager_instance():
|
||||
def get_developer_ecosystem_manager_instance() -> "DeveloperEcosystemManager | None":
|
||||
global _developer_ecosystem_manager
|
||||
if _developer_ecosystem_manager is None and DEVELOPER_ECOSYSTEM_AVAILABLE:
|
||||
_developer_ecosystem_manager = DeveloperEcosystemManager()
|
||||
@@ -13780,9 +13780,9 @@ async def get_portal_config_endpoint(config_id: str):
|
||||
# ==================== Phase 8 Task 8: Operations & Monitoring Endpoints ====================
|
||||
|
||||
# Ops Manager singleton
|
||||
_ops_manager = None
|
||||
_ops_manager: "OpsManager | None" = None
|
||||
|
||||
def get_ops_manager_instance():
|
||||
def get_ops_manager_instance() -> "OpsManager | None":
|
||||
global _ops_manager
|
||||
if _ops_manager is None and OPS_MANAGER_AVAILABLE:
|
||||
_ops_manager = get_ops_manager()
|
||||
|
||||
Reference in New Issue
Block a user