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