mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-26 18:22:23 +02:00
fix(typing): resolve mypy errors in agent
This commit is contained in:
parent
b9192438c9
commit
07560b0026
@ -57,7 +57,7 @@ except ImportError as e:
|
|||||||
AI_COPILOT_AVAILABLE = False
|
AI_COPILOT_AVAILABLE = False
|
||||||
|
|
||||||
# Provide stub functions that raise helpful errors
|
# Provide stub functions that raise helpful errors
|
||||||
async def get_project_agent_manager():
|
async def get_project_agent_manager() -> "ProjectAgentManager":
|
||||||
"""
|
"""
|
||||||
Get the global ProjectAgentManager singleton instance.
|
Get the global ProjectAgentManager singleton instance.
|
||||||
|
|
||||||
@ -68,7 +68,7 @@ except ImportError as e:
|
|||||||
"AI Copilot is not available. Install AI dependencies with: pip install gns3-server[ai-features]"
|
"AI Copilot is not available. Install AI dependencies with: pip install gns3-server[ai-features]"
|
||||||
)
|
)
|
||||||
|
|
||||||
class ProjectAgentManager:
|
class ProjectAgentManager: # type: ignore[no-redef]
|
||||||
"""
|
"""
|
||||||
Stub class for ProjectAgentManager when AI dependencies are not installed.
|
Stub class for ProjectAgentManager when AI dependencies are not installed.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@ -294,7 +294,6 @@ enable_error_code = ["ignore-without-code", "redundant-expr", "truthy-bool"]
|
|||||||
# Baseline: modules with existing type errors (error count at baseline time).
|
# Baseline: modules with existing type errors (error count at baseline time).
|
||||||
# Remove modules from this list one small PR at a time. Never add new ones.
|
# Remove modules from this list one small PR at a time. Never add new ones.
|
||||||
module = [
|
module = [
|
||||||
"gns3server.agent", # 2
|
|
||||||
"gns3server.agent.gns3_copilot.agent.context_manager", # 5
|
"gns3server.agent.gns3_copilot.agent.context_manager", # 5
|
||||||
"gns3server.agent.gns3_copilot.agent.model_factory", # 4
|
"gns3server.agent.gns3_copilot.agent.model_factory", # 4
|
||||||
"gns3server.agent.gns3_copilot.chat_sessions_repository", # 8
|
"gns3server.agent.gns3_copilot.chat_sessions_repository", # 8
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user